Bruce Wheaton wrote:
What's the preferred way to do this? I need to separate a shader into an
H and V pass. I suppose I could double the scene in the graph, but since
the first pass needs to be to a texture that wouldn't do it, would it.
So I suppose I need another camera with an FBO using the same scene -
render to that with my H shader, then use that plus all the new FBO as
the source for the final pass? That seems odd to me, since a lot of the
objects might be partially obscured in the first pass. Do I need to use
an interim texture/camera for each object?
Is there an example doing this? I understand it's a favorite way to do
glows.
Most articles on glow describe rendering the scene using MRT to create a
rendered scene image and a separate glow map. Then blur the glow map first in x
then in y. Finally, composite the two textures together to create the final image.
The tool that (unmodified) OSG offers for this is the Camera. You would use one
camera to create the rendered scene texture and the glow texture. Then use a
second camera to blur the glow texture in x. Use a third camera to blur it in y.
Finally, use a fourth camera to combine the rendered scene texture with the
blurred glow map.
All these Cameras adds a lot of overhead on the CPU side, but the only way to
reduce that would be to derive custom RenderStage classes, something most OSG
developers choose not to do. osgPPU offers an alternative and might be worth
considering.
--
-Paul Martz Skew Matrix Software
http://www.skew-matrix.com/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org