Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

LongingForDeath

Pointsize with VertexShader

This topic is 5933 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi! I want to render a starfield by rendering vertex points. The problem is that the points have a different size in different screen resolutions. With the fixed-function pipeline I was able solve this problem by setting the D3DRS_POINTSIZE renderstate. But unfortunately this has no effect for vertex shaders, which I''m using now. I tried it by putting a FLOAT into the vertex structure for the pointsize. In the vertex shader I wrote mov oPts, v4 to apply the pointsize to the vertex. If I change this value I can see a change in size. But the size is different for different resolutions anyway. Do you know a solution for this problem? I can''t see my mistake. - LongingForDeath

Share this post


Link to post
Share on other sites
Advertisement
Hmm... I''m not very much into VS, since I''m on a sucky GF2, but shouldn''t the place where you insert the pointsize make a difference? Put it before you make all the transforms, and it might work.

Otherwise, scale it according to that resolution you''re in

T

--
MFC is sorta like the swedish police... It''''s full of crap, and nothing can communicate with anything else.

Share this post


Link to post
Share on other sites
No, the place where I insert the pointsize doesn''t make a difference. To scale the size according to the resolution would solve the problem. But there must be another solution, since it is possible with the fixed-function pipeline.


- LongingForDeath

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!