Hi,

can I add something here?
What about a simple multipass (unknown until the draw stage), with rendering 
done by a glsl shader, and shader variable update in function of the pass, like:

void render() {
    setGlslProg(prog); //which uses uniform_x

    for(i(0); i != num_of_passes; ++i) {
        //change the same uniform in function of the pass i
        uniform_x->set(i / num_of_passes);
        render(node); //actually render pass i!
    }
}

This is somewhat similar to what is being discussed here, and also conceptually 
incredibly simple, but apparently very complicated to implement with osg. 
Apparently you cannot change the uniform in your own implementation of the 
cull_draw traversal, as suggested early, because in the end all passes will be 
rendered with the same uniform value!?
As if the cull_draw did not actually submit the geometry to GL between passes. 
(still have to check it out in the code).

Ideas? 

Thank you!

Cheers,
Paulo

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=19575#19575





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to