I’m trying to figure out how to create a depth texture that I can use from frame to frame in C++ / GLSL.
Lets say on frame number one I set gl_FragDepth of a few random pixels to 0.5. Before rendering frame 2, I’d like to apply the depth state to a texture. This way, in frame 2, I can determine which texels are at 0.5 so I can further manipulate them.
I can’t seem to find any clear tutorials/reference/instructions on how to do this.