Hi Alex, Note that doing (1) doesn't preclude RTT - e.g. you can RTT the whole inverted scene to a texture and then generate appropriate texcoords on the mirror, either "by hand" since your camera is fixed, or in a shader.
Plus I'm not sure why you think that (1) is "quite a few additional render passes". Obviously with RTT it's only one more pass - the inverted scene - but without RTT, and with a stencil buffer, you only have to draw (a) the mirror, with stencil buffer set, (b) the inverted scene respecting the stencil buffer, (c) the rest of the scene without the mirror. Good control of your renderbins makes this fairly easy. Additional issues with (1) might include the fact that you have to manage the lighting (i.e. you have to invert the scene lighting as well, otherwise it looks pretty odd). Also, an unlikely but possible issues is that If you have some special requirements for poly winding - e.g. models with special shaders - note that if you just mirror the scene, all the winding inverts as well. FWIW, I would do either technique as RTT, as then effects like blur, or mirror surface non uniformity, or things like this become a lot easier (in GLSL). Given theat, I'm not sure I have a strong favorite. I guess I'd do (2) since your camera(s) are fixed; you need a new camera to do RTT anyway so setting it up inverted is easy. The only reason I might not is if I want to play with complex camera settings later which might be a pain to implement e.g. stereo, strange projections, etc. Rendering performance should be near identical (assuming RTT for both). Hope that helps, David
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

