I have created a depth texture from the contents of the entire depth
buffer of my opengl scene. Is it possible to "render" a quad textured
with this depth texture back to the depth buffer? I came up some
tutorials mentioning that it is possible to put the depth values stored
in a depth texture back to the depth buffer using glDrawPixels, but I
need a faster way. What I'm trying to accomplish, is to restore depth
values stored to a depth texture back to the depth buffer, without
manipulating pixels. Can't it be done somehow?
Thanks in advance
ThM
Have a look there:
http://groups.google.com/group/comp.graphics.api.opengl/browse_thread/thread/e13718a713bc347b
Fungus gave the answer to this question there.
Hope this help
Cathy L.
Yes, you can write a shader that outputs to gl_FragDepth.
--
John Tsiombikas (Nuclear / Mindlapse)
http://nuclear.sdf-eu.org/