There was a discussion just a few weeks ago that you might find helpful.
Try searching the archives for "Repeatable rendering of subgraphs, ideas?".
-Paul
Paulo Silva wrote:
Hi,
I'm trying to do a multipass effect, which uses only one shared shader program
among all passes, but between passes the uniforms need to be updated.
The way I found to do this was to create n statesets, and n times the same
uniforms, one per sate.
This is a bit awkward, since I think I should be able to share the uniforms,
and just update them once per pass in a callback.
The problem is that as far as the source tells me, the update traversal is done
before all the passes, as something like:
event();
update(); //update all nodes/statesets/uniforms
cull();
draw(); //draw all nodes/statesets
So, there's no way that I can update an shared uniform, if it needs to be
updated between passes?
Thank you!
Cheers,
paulo
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=19532#19532
_______________________________________________
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