Hi osg-users,
is it possible to access the Z-Buffer content from a render pass 1 in
the shaders during a second render pass 2 if I do not clear the Z-Buffer
content in pass 1?
In my project I render my scene in pass 1 and set the clear mask for
pass 2 to "0", hence not clearing neither the color nor the depth buffer:
pCamPass2->setClearMask(0);
Now, how do I read out the Z-Buffer content of the gpu for a given pixel
in the fragment shader of pass2?
Trying to read from gl_FragDepth did not work.
Any suggestions?
Cheers
Daniel
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org