3D Points

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.



Answer this question

3D Points

  • _daz

    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).


  • Fatalerr

    Point sprites work just like this. And with vertex shaders yes you can write your shader to do whatever behavior you want...


  • bitem2k

    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


  • 3D Points