Hi folks,

In my deferred setup I have multiple cameras rendering different subgraphs of the scene.

Setup is more or less like this:

MainCamera
    |
    PreRender1 - RELATIVE_RF(Gbuffer)
    |
    PreRender2- RELATIVE_RF(Transparent objects)
    |
    PreRender3 - ABSOLUTE_RF (SSAO)
    |
    ...
    |
    OutCamera - ABSOLUTE_RF (FullScreen Quad)
The cameras are all rendering to framebuffer rendertargets and setup their render order as in the diagram above.


This works really fine as long as I use setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR); If I switch to any other mode in the PreRender1 the other cameras seem to use their original near/far. I already tried to set the projection matrix of the other cameras in a cull-callback (on the main and on the PreRender1) but it seems after the cullvisitor has traversed the projection-Matrix of the camera still shows the same near far planes. Also I tried to install a ClampProjectionMatrixCallback to the MainCamera. This worked, but unfortunally with the same result. The projection is indeed clamped, but it is not applied to the other relative cameras. The last hours I tried to play around with the inheritance masks of the cameras but this didn't help in any way.

Any Idea what I'm doing wrong here?
Also could someone explain to me what the difference between the PreRender and the NestedRender are in this setup?

cheers
Sebastian

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to