I want to draw some primitives behind everything that wrote to the depth buffer by using glDepthFunc(GL_EQUAL)
and writing to every pixel that has a depth of 1.0
(the highest and default value)
However, for this to work I have to ignore the calculated Z-depth on my primitives, forcing them to test as if it were 1.0
for all of them.
What would be the easiest way to force all fragments in a specific draw to test as having a z-depth of 1.0
regardless of the actual z-depth calculated in the vertex shader?