Hi Sebastian,

I am using slave cameras with different render order num.
Are your cameras both using a different fbo (both calling 
setRenderTargetImplementation(Camera::FRAME_BUFFER_OBJECT) ) , or your second 
camera is a child of the one with an fbo ?

Regards,
-Fred


----- Mail original -----
De: "Sebastian Messerschmidt" <sebastian.messerschm...@gmx.de>
À: "OpenSceneGraph Users" <osg-users@lists.openscenegraph.org>
Cc: "Frederic Bouvier" <fredlis...@free.fr>
Envoyé: Lundi 5 Décembre 2011 17:02:17
Objet: Re: [osg-users] Sharing depth buffer between fbos

Hi Frederic,

I'm using a similar setup. I simply attach the the depth-buffer-texture 
to the first RTT pass and later on bind it to multiple passes that need 
to have depth writes disabled.
This way everything works as expected.
My RTT cameras are childs of the root node of the scene.
Setting the render order of the cameras explicitly did the trick for me.

cheers
Sebastian
> Hi All,
>
> I need to initialize the content of the depth buffer of a FBO with the result 
> of a RTT pass where I setup a DEPTH_ATTACHMENT to a depth texture.
> IOW, I want two fbos with the same depth buffer, the second being read only.
> AFAICS in gDebugger, the attachment to the second fbo cancels the attachment 
> to the first.
> The only method I can think of at the moment, is to render a screen aligned 
> quad with the depth texture bound to it and use a fragment shader to 
> initialize the depth buffer of the second fbo using gl_FragDepth.
>
> So what do you think of that and how would you do something like that ?
>
> Regards,
> -Fred
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to