Hi,

what is your clearmask set to for the 2nd camera? Are the projections the same for the 2 cameras? How about depth range?

Only other thing I can recommend is have a look at osgUtil/RenderStage.cpp and check for search for "depthAttached". You'll find the code and osg bitmasks you can set for controlling depth/stencil for FBO.

jp



On 10/01/11 01:02, Brian ... wrote:
folks,

i'm trying to create 2 render to texture cameras that share the same
depth and stencil buffer.

i want to render color, depth, and stencil values with the first rtt
camera and then use the resulting depth and stencil with the second rtt
camera.

this is what i'm doing:

create color texture1
create depth texture
create stencil texture

create rtt camera 1
attach color texture 1
attach depth texture
attach stencil texture

create color texture2

create rtt camera 2
attach color texture 2
attach depth texture
attach stencil texture

here's the scene graph

root
rtt camera 1
scene group 1
rtt camera 2
scene group 2

the color, depth, and stencil textures look ok coming out of camera 1,
but the depth and stencil textures after camera 2 are blank (all zero).

is this the right way to do this?

thanks,

brian



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

--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support.

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

Reply via email to