Pointsize with VertexShader

Started by
2 comments, last by LongingForDeath 21 years, 9 months ago
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
visit DyingHour
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.
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
visit DyingHour
No one has an idea?


- LongingForDeath
visit DyingHour

This topic is closed to new replies.

Advertisement