Archived

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

Pointsize with VertexShader

This topic is 5647 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
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