I need to use a texture, rendered with geometry, as a mask (with transparency levels) for other operations. It's for a transition - let's say a fullscreen wipe effect to be understandable.
So the flow will go (in an openGL sense, at least): - Draw some layers into framebuffer, with alpha blending per layer, - Clear depth, set a blending factor - Draw more layers over, using each layers alpha, the blend factor, and the mask as an overall 'stencil'. So the layers could be fading on while a wipe is happening, for instance (by animating the mask). I think I've worked out how I would do it in OpenGL terms - render into a screen sized FBO, then use that as a texture in all the other operations with a shader that uses that texture as a master mask. Are there any OSG mechanisms to make this easier? Any current examples? I found an old link saying osgPlanets uses an alpha mask, but now it seems to use lighting for the same purpose. A side topic - in researching, I discovered that rendering your whole scene into an FBO is problematic because there's no real alpha blending. There's some OSG examples that do this - osgPrerender, for example. Any tricks to work around this? Ping-ponging 2 FBOs springs to mind, but that sounds really painful. Regards, Bruce Wheaton PS - Note this isn't basic multitexturing - the alpha mask has to be rendered into the scene with geometry and blending also - in fact I will probably use the alpha of one or more layers that will also be used in the visible drawing pass. Probably best to think of the mask as a complete other pass of a branch/scene, with it only making a mask. _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org