🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Draw Vertices Normals with Backface Cull

Started by
1 comment, last by kubera 3 years, 10 months ago

Hi All

The vertices normals drawing looks like a very simple task: specify positions and normals as attributes and generate lines with geometry shader ("points" input). However with culled backfaces some vertices can be invisible, so their normals should not be drawn.

How can I solve this in geometry shader? If I specify “triangles” as input, then I can check the cull, but how to get normals for vertices?

Or it's unavoidable to use a portion of CPU code here?

Thx

Advertisement

Maybe replacing vertices order in the triangle help. It would change the “internal triangle” to “external triangle”.

This topic is closed to new replies.

Advertisement