Hey guys, I want to render my scene like normal, but I want to change the depth buffer that gets outputted (for the sake of the example, lets say I want to invert the depth buffer that gets writen).
I wrote a shader which outputs 1 - COMPUTE_DEPTH_01 as the depth, which inverts it correctly, but the scene renders as a flat color. I want to render the scene and have the objects in the scene use their normal materials.
Right now I have to use 2 render texture, both the same size as the screen… I render normally into one RT, and render again into the second one using RenderWithShader (using a shader that inverts my RT). I get my RGB values from the first RT, and A (Depth) value from the second.
This is terribly inefficient. Can I just combine the 2 operations using the one RT and one render call?