Hello, I have a big 3d scene, so I have some drawables, each drawable have his stateSet and each stateSet have a program (shader.vsh+shader.fsh) (lambert/phong/...). It works fine for a single pass.
But if I want to make my rendering in 2 passes using different shading ?... I explain : - In the first pass I wan't to bake some data in some textures (using FBO) -> One unique shader for the scene - In the second pass, I will use classical illumination shaders and render to a texture too -> One shader per drawable - In the last pass, I just render a quad with a shader wich will cook my different textures ... So my problem is : how do I render the same scene twice with 2 different shading without parsing all my drawables in my draw func to modify shaders ? Is it possible to override stateSets ? (Do not tell me to duplicate my scene please :? ) Thank you for your help ! Cheers, Baptiste ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55936#55936 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

