Hi Bob,

I think my data items are going to be per Geode (e.g., thickness of a
"part"), but I thought I still needed shader attributes instead of uniforms,
because uniforms are per frame.  Unless you're thinking I'd make an array of
them where the indexing is the Geodes?

Nope, you can set uniforms in the state set of a node/drawable. So each node/drawable can have a different value for the same uniform (as long as you name all your uniforms on each node with the same name). OSG will automatically use the closest uniform in the current Drawable's path up to the scene root as the current value of the uniform with that name when rendering that drawable.

Attributes are only useful if you need per-vertex data. Anything coarser than that and you're better off with uniforms.

Hope this helps,

J-S
--
______________________________________________________
Jean-Sebastien Guay    [email protected]
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to