Hi, Thanks for the reply.
bthrall wrote: > > The shader has a sampler2D uniform that needs to be set to the texture > unit you want to use; as long as you attach a different Texture2D to > each geode/drawable on that texture unit, the shader will see that > geode/drawable's texture. Well, the shader can only access textures belonging to the same stateset, right? For example: [Image: http://img7.hostingpics.net/pics/398942graphe_shader_textures.jpg ] (http://www.hostingpics.net/viewer.php?id=398942graphe_shader_textures.jpg) Texture0 is the sampler2D given to the shader (well, its unit). I would like to load texture0 as texture1 while OSG draws drawable1, and load texture0 as texture2 while OSG draws drawable2. I guess I could set a shader for each, but first, the scenegraph can be of any complexity, then it could need a great number of shaders, it would be bad. Moreover, I'm not sure on how they will overwrite each other (if so). Do you still think I can do this without callbacks? Thank you, Max ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=15680#15680 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

