Hello Christian,

do you need to copy it? Or is it sufficient to re-use it in terms where it is allowed to be modified by the second pass? If later applies, you simply can bind the same depth buffer as input texture to your RTT pass.
Hi,

I've been modifying the "osgoit" code sample to allow opaque objects to occlude the depth peeled layers.

I found that rendering the opaque geometry into the depth buffer of each peeled layer causes a lot of overhead because of the extra culling and geometry passes each time.

Instead I would like to render my opaque object just once into the first slave camera's depth buffer and copy the contents of its depth buffer into the other slave cameras (or rather FBOs) before performing the depth peeling passes.

So instead of clearing the z buffer at the start of each frame, would it be feasible to copy the depth buffer from one FBO into another, and with reasonable performance?

Christian




_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to