Fuzzy Face Culling

I am trying to implement some face based operations in a fragment shader…

My thoughts then are to use some combination of VBOs / uniforms / normal maths, or even the fixed function FrontColor / BackColor uniforms to get the required info into the fragment shader.

Is this the best way to do it?
Any better suggestions?


Just store some data to identify your face per vertex, and duplicate that data across all vertices belonging to the same face.


Without a geometry-shader, you should draw each face independently (meaning: no index-buffer-object, you should use glDrawArrays), and as Jan said - duplicate the same per-face “attribute” onto the 3 vertices. This will increase the size of the VBO many times and ignore gpus’ cache of already-computed vertices.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.