
Originally Posted by
Dark Photon
What you've posted is a scene graph and some shaders. What we need to see instead of the scene graph is the GL call trace that's produced by running all this. In particular the parts setting up state for and rendering to your FBO with the depth texture.
Without that, your best bet is to search the OpenSceneGraph sample code for an example of how to render to a depth texture with OSG and/or posting a question about how to do render-to-depth-texture to the osg-users forum. The trick is knowing how to use OpenSceneGraph to get the GL state setup properly for rendering.