Hi,

I am new to OSG (and rusty with GLSL) and am having some problems, I hope 
someone can help since I cannot find any posts about it. It is a bit difficult 
to explain, I will do my best:

- I have two models; one .flt (a tank) and one .3ds (a plane).
- Both have multiple textures to cover the entire model. The .flt model has two 
different sets (one normal and the other a heat map).
- The models are loaded into an osg::Node via osgDB::readNodeFile.
- They display fine via the default render setup.

Now I want to write a custom shader for some special effects. Somehow for each 
model the textures are already bound to the shader, without any coding from my 
side. I can access them by declaring a uniform sampler2D in the fragment shader 
and calling texture2D(samplerName, gl_TexCoord[0].st). The models display fine 
via this method. So even though I index one texture I am rendering all the 
textures from a set.
I cannot figure out how to access the other texture set of the .flt model in 
the shader. 
Additionally I cannot find any textures in the nodes in normal code; 
getTextureAttributeList returns zero size.

So how do I do this?

Also I would like to know how it is possible that the shader renders all the 
textures in a set while only indexing one, does OSG automatically combine them 
into one texture during import?


Thank you in advance!

Cheers,
Meessen

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





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

Reply via email to