[osg-users] How to render (sub-)graph only into depth buffer?

Robert Osfield robert.osfield at gmail.com
Sat Dec 17 01:47:02 PST 2016


HI Hartwig,

What you describe is a multiple pass render to texture, the way one
does this with the OSG is to use an osg::Camera placed as slave Camera
or a Camera placed in the scene graph.  The Camera has a setRederOrder
method this tells the cull traversal what order to draw things in.
Have a look at the osgVolume::MultipassTechnique for an example of
rendering to a depth texture and then using the result in the main
pass.

Robert.

On 17 December 2016 at 08:14, Hartwig Wiesmann
<hartwig.wiesmann at skywind.eu> wrote:
> Hi,
>
> sorry, my fault.  I messed up the rendering order. If the sphere is rendered first, it works.
>
> Thank you!
>
> Cheers,
> Hartwig
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=69699#69699
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org



More information about the osg-users mailing list