Hello Werner,

You are not providing enough info to give you an exact answer,
but I guess you are trying to blend the result of two camera passes into one FBO. Simply set up two pre-render cams and enable blending for the second one, that should do the trick.

Unfortunately you didn't really explain what your second camera is rendering, so I can only guess, that you are trying to mix foreground with background.

cheers
Sebastian

Hi,

I'm now experimenting for a very long while and I can't get things working.
I have one camera doing a statick wallpaper background and the main scene 
camera.
When assigning camera 1 to do PRE_Render mode and setting the clear mask to 
just deph clearing everything looks fine on the screen.

Now I need the same to render into a PBO or FBO.
Unfortunately I can't get the same result as on the screen.
Either it is the image of cam 1 or cam 2 but never both like on the screen. Why?
I played arround with render bins etc. but without success.
Even If I just modifying the 2 cams from the working screen setup by setting:
Code:
cam1->setRenderTargetImplementation(osg::Camera::FRAME_BUFFER_OBJECT);
cam1->detach( osg::Camera::COLOR_BUFFER );
cam1->attach( osg::Camera::COLOR_BUFFER, fbImage.get(), 0, 0);
camera->setClearMask(GL_DEPTH_BUFFER_BIT );




and the same with the cam 2 (except the clear mask) it just shows the output of 
cam2.

Any explanations here? Any help is very welcome.


Thank you!

Cheers,
Werner

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





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

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

Reply via email to