<p>The full and complete statement you are responding to is:</p>
<blockquote>
<p>Never use tessellation for anything other than <em>tessellation</em>. Don't use it as a fancy way to discard vertices.</p>
</blockquote>
<p>The algorithm you have described is actually <em>doing</em> 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.</p>
<p>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.</p>

CC BY-SA 4.0
2023-01-20T07:35:51.677Z
ahh okay,  so the way I'm using it is okay... Thanks a lot!
Thomas
CC BY-SA 4.0
2023-01-19T15:04:00.370Z
2023-01-19T15:04:00.370Z
Nicol Bolas
<p>In the discussion <a href="https://computergraphics.stackexchange.com/questions/13199/how-to-instanced-and-indirect-render-geometry-opengl">Here</a> there was said, that discarding faces during Tessellation stage should be avoided. What are the reasons for that?</p>
<p>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 <code>gl_TessLevelOuter</code> and <code>gl_TessLevelInner</code> values to zero. This works very well and my performance seems to be good.</p>
<p>Sure, it is easy to discard fragments during Fragment shader stage but then, the performance dropping calculations are done.</p>

<opengl><glsl>
Why shouldn't I discard faces during Tessellation control stage
Thomas
# Why shouldn't I discard faces during Tessellation control stage

(Asked by: username_0 on 2023-01-19)

In the discussion [Here](https://computergraphics.stackexchange.com/questions/13199/how-to-instanced-and-indirect-render-geometry-opengl) 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.

**Tags:** opengl, glsl


---

## 1 answers

### Answer by username_1 on 2023-01-19. Score: 2 | Accepted answer

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.

> **Comments:**
> **username_0**: ahh okay,  so the way I'm using it is okay... Thanks a lot!  

---

