[osg-users] How to render (sub-)graph only into depth buffer?
Christian Buchner
christian.buchner at gmail.com
Sun Dec 18 08:20:37 PST 2016
There's also an osgoit sample program that renders a subgraph (a
non-transparent truck model) first, and then performs depth peeling render
passes (ping-pong) of the other transparent objects. The depth buffer
contents from the initial solid pass are copied via blit from one FBO to
the next one. This sample code uses Frame Buffer Objects, if I remember
correctly.
Christian
2016-12-17 10:47 GMT+01:00 Robert Osfield <robert.osfield at gmail.com>:
> 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
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20161218/e5787014/attachment-0002.htm>
More information about the osg-users
mailing list