Steven Powers wrote:
In practice, I'm creating 2 textures and storing shader relevant data in them.
I'm assigning them to the state set using setTextureAttributeAndModes(1,...) and setTextureAttributeAndModes(2,...) but some objects in the scene must also have textures defined for these texture units.

Are you also setting up corresponding sampler uniforms?

This causes an override of the data I've assigned to texture unit 1 and 2.
Is there a way to keep this from happening?

If some higher-level parent node assigns a texture to unit 1, and somewhere in a subgraph, another node assigns a different texture to unit 1, then by default the child subgraph's texture gets used. You can change this behavior, to some extent, by specifying the OVERRIDE mode when you set the higher-level parent node's texture StateAttribute.

Aspects of state inheritance are well-documented in the Quick Start Guide.
   -Paul

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

Reply via email to