[osg-users] Multisampled FBO camera with shared depth with other camera

Jan Stalmach stalmachjan at gmail.com
Fri Mar 17 08:19:43 PDT 2017


Hi,

I have strange problems with multisampled FBO Camera and I am not able to solve it. Without multisampling all works fine but when I setup multisampled FBO the color buffers in our transparent camera are void.

Our setup is quite complex due to order independent transparency:

1. Viewer has masterCamera (normal camera, no FBO) (Viewer->SetCamera(master)) that is setup with cullmask to render only solid geometry. Depth buffer attachement is created (masterCamera->attach(osg::Camera::DEPTH_BUFFER...)  and shared across all cameras for correct depth test.

2. Viewer add transparent FBO camera as a slave (viewer->addSlave(transparencyCamera)). This camera has cullmask to render only transparent geometry. It has two colors buffers and one depth buffer attached.

3. Viewer add composition camera (camera with only quad child) that compose solid (current frame buffer) and transparent FBO textures together.

I have tested all possible combinations with multisampled attachments but all failed. Camera order is correct (all works superfine without multisampling)

Do you have any idea or hint where could be the problem?

... 

Thank you!

Cheers,
Jan

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=70509#70509








More information about the osg-users mailing list