How to store origin depth values in depth attachment?
I am trying to implement rendering points on top of geometry as in Blender. The algorithm is as follows: rendering is done through PointList without depth test. The depth test is done manually in the shader. We have a point. (Let’s say a 5×5 square). And I compare the depth of the center of this square (vertex depth) with the depth of the scene. I get the scene depth through the depth texture sampler.
I am facing a problem while comparing the depth. The data doesn’t add up.
Here is an example of the most common case: