There's also the osgfpdepth example, which does render to an FBO with a floating point depth buffer and then renders the image to the window color buffer.
Tim On Fri, Jun 8, 2012 at 6:25 PM, Paul Martz <[email protected]> wrote: > I'm fairly certain you can access the RenderStage in a Camera callback, but > I'm not sure you're approaching the problem correctly. > > It seems like the multipass rendering you describe below could be > accomplished by using a series of Cameras. In OSG these must be arranged > hierarchically, but you set the Cameras as pre- or post-render to specify > the sequential rendering order. There's an osgprerender example that uses > multiple Cameras, which you might find helpful. > -Paul > > > > On 6/8/2012 9:30 AM, Paul Leopard wrote: >> >> I'm a little confused here … I’m working on an application and I think I’m >> close to completing it but I have come to a point where I need some help. >> First some background : >> >> The application requires anti-aliasing of a scene and the subsequent >> creation of floating point color and depth textures that can be sampled and >> used like any ordinary texture. Specifically I need to do the following: >> 1) Render the scene to an offscreen FBO that has float color and >> depth render buffers attached to it and is configured for AA >> 2) Automatically blit the color and depth buffers in the FBO to >> another FBO that has attached float color and depth textures. >> 3) Query/sample the depth texture and map the color texture onto a >> quad >> >> I have successfully got this to work in standard OpenGL. Now I am trying >> to understand how to do this in an OpenSceneGraph context. I see that >> RenderStage has what I need in terms of the render buffer and resolve buffer >> blit … good so far … >> >> So … I suspect that what I need to do is to get a pointer to a RenderStage >> and configure that instance. I have a custom camera class (class IRCamera : >> public osg::Camera) that I am using for offscreen rendering. Currently it >> just has a color texture attached to it and I am using that rendered texture >> successfully. I want to rework this custom camera class to use the >> multi-stage approach so that I can take advantage of AA and still have the >> rendered results in a texture. >> >> Is there a way for me to get a pointer to a RenderStage instance >> associated with my custom camera? Is this the proper approach for what I >> want to do? >> Thanks in advance, >> Paul >> >> ------------------ >> Read this topic online here: >> http://forum.openscenegraph.org/viewtopic.php?p=48142#48142 >> >> >> >> >> >> _______________________________________________ >> 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 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

