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

2017-01-07 Thread Hartwig Wiesmann
Hi, isn't it also a viable solution to use a slave camera that just pre-renders its depth related scene into the depth buffer and use the main camera to render the real scene afterwards? Both cameras operate on the same context. Though I do not know whether it causes any problems. Cheers,

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

2016-12-18 Thread Christian Buchner
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.

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

2016-12-17 Thread Robert Osfield
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

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

2016-12-17 Thread Hartwig Wiesmann
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] How to render (sub-)graph only into depth buffer?

2016-12-16 Thread Hartwig Wiesmann
Hi, I would like to fill the depth buffer with the data of a rendered subgraph. The subgraph itself should not be visible in the view. Afterwards, I want to render another - and now visible - subgraph that uses (and modifies) the previously filled depth buffer. How can I do this? I wrote a