Original depth values.

I can’t find a way to restore the original depth value of a pixel in the depthbuffer under the orthographic projection. I tried to use the projection matrix but it’s not working.

More detail please, It’s not clear what the projection has to do with it. I assume you’re talking about an image read & draw operation but you make it sound like you’re trying to use matrix operations and I don’t understand why (unless it’s simply to position the DrawPixels call).

Opengl stores the depths of the image in a special buffer. the values in this buffer are between 0.0 to 1.0.
even if the objects in your scene have other depth range, opengl transform them to be in the range from 0.0 to 1.0 and i want to know what is this conversion that opengl does before it stores the values in the depth buffer.