I use texCoord1 as an example.
in fact you have to use: in the vertex shader: gl_TexCoord[1] = gl_MultiTexCoord1; or define your own output variable out vec2 texCoord1; texCoord1 = gl_MultiTexCoord1; in the vertex/fragment shader: vec4 normalFromTexture = texture(normalMap, gl_TexCoord[1]); or define your own input variable in vec2 texCoord1; vec4 normalFromTexture = texture(normalMap, texCoord1); HTH David Callu 2011/5/4 Nan WANG <nan.c...@gmail.com> > could you explain why here you used texCoord1? > > because of we setting '1' here? > sset->setTextureAttributeAndModes(1,tex2D,osg::StateAttribute::ON); > sset->addUniform(new osg::Uniform("tex",1)); > > i dont think so ... > > > > > > Thank you! > > Cheers, > Nan > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=38990#38990 > > > > > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org