1
$\begingroup$

In the discussion Here there was said, that discarding faces during Tessellation stage should be avoided. What are the reasons for that?

Right now, I am rendering a 3D geometry using Vertex, Tessellation and Fragment shader. Some of the faces should be and some should not be rendered, changing from frame to frame. My Tessellation Evaluation shader is quite complex and a big performance drop when all faces are calculated. So my idea was to discard faces before executing the Tessellation Evaluation stage by setting gl_TessLevelOuter and gl_TessLevelInner values to zero. This works very well and my performance seems to be good.

Sure, it is easy to discard fragments during Fragment shader stage but then, the performance dropping calculations are done.

$\endgroup$

1 Answer 1

2
$\begingroup$

The full and complete statement you are responding to is:

Never use tessellation for anything other than tessellation. Don't use it as a fancy way to discard vertices.

The algorithm you have described is actually doing tessellation. As a consequence of that tessellation process, you are able to discard some patches before tessellating them. But that's a consequence of doing tessellation.

The point of the statement is to keep you from just shoving a tessellation shader into the middle of your pipeline for the sole purpose of discarding faces.

$\endgroup$
1
  • $\begingroup$ ahh okay, so the way I'm using it is okay... Thanks a lot! $\endgroup$
    – Thomas
    Commented Jan 20, 2023 at 7:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.