locked
3D Points RRS feed

  • Question

  • Hi everyone,

    I am working on my Direct3D project  and I have question about drawing 3D points in Direct3D. I want to draw 3D  points that have more than one pixel. Just  like SetWidth() in Line class. Any hints would be appreciated.

     

    Thursday, October 19, 2006 2:30 PM

Answers

  • Point sprites work just like this. And with vertex shaders yes you can write your shader to do whatever behavior you want...
    Thursday, October 19, 2006 3:32 PM

All replies

  • Use point sprites if their restrictions are ok with you. That way, you still send a single vertex but it will get expanded automatically for you in the pipeline to become a quad of the size you want, and it will have texture coordinates generated for it (sampling the full range of 0->1)...

    Usually the restrictions with point sprites are size restrictions. Old hardware used to max the size to something like 64x64 pixels on the screen. But today's hardware seems to set this value to a crazy 4k pixels or something around that...

    The other way around is to use vertex shaders to expand your points (search for particle sprites on the net and you'll find a helluva tutorials for this).
    Thursday, October 19, 2006 3:14 PM
  • Hi Wessam,

    Thank you very much for your info. With SetWidth() in Line class, I can make lines thicker and these thickness is not change when I zoom in and out the screen. I want 3D points to be the same. Will the vertex shaders provide what I need? thanks 

    Thursday, October 19, 2006 3:22 PM
  • Point sprites work just like this. And with vertex shaders yes you can write your shader to do whatever behavior you want...
    Thursday, October 19, 2006 3:32 PM