Will a mesh with overlapping triangles at a particular fragment call the fragment shader multiple times?

Let’s say that I’m rendering a mesh and at a given fragment, there is more than one triangle from my mesh that spans it. Will my fragment shader be called once for each triangle? If so, is there an ordering to the fragments I’m given?

The triangles will be rendered in the specified order. However, if early fragment tests are enabled (either with an explicit layout qualifier or by the driver detecting that they can be enabled as a transparent optimisation), then the fragment shader won’t be invoked for groups of fragments which all fail the depth or stencil test (if enabled).

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