Hi,

I would like to add a global uniform to my scene graph (OSG 3.0.1).

By "global", I mean that "all shaders can access to its value, anywhere in the 
graph"

So, first I've binded this uniform on my scene graph root object, it works well.

But now, the project has evolved and I need a modification : the global uniform 
is not anymore a part of the scene graph root object stateset, but added to a 
leaf node stateset.

Is there anyway to make this uniform accessible by every shader in the scene 
graph ?

I'm thinking about the "gl_light" stateattribute which affect the whole scene 
even if it's not set on the top object. Is there anyway to get this behavious 
for a uniform ?

I've also read this topic : 
http://forum.openscenegraph.org/viewtopic.php?t=4755 :
use cull callback to edit a uniform value, but I need to add a uniform

And I found this : "osgUtil::SceneView::getGlobalStateSet()" which is maybe 
usefull, but the "osgUtil::SceneView" is deprecated, so I don't know if I 
really can use it.

Thank you!

Cheers,
Aurelien

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





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

Reply via email to