Hi !
I am developing a shader and need to have acess to the optional textures
which is affected by the coordinates in tgl_TexCoord[1].
How do i do this, how do i send the second texture from the ive file
(the shadow map) into the shader, or how do i reach it in the shader if
its passed in automatic? should i set something in the stateset of the
specific node i run the shader on?
Tnx for advices.
// shaders without unreleveant code.
// vertex
void main()
{
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
gl_TexCoord[1] = gl_TextureMatrix[1] * gl_MultiTexCoord1;
}
// fragment
void main()
{
vec4 color = texture2D(tex, gl_TexCoord[0].st);
vec4 map = texture2D(tex1, gl_TexCoord[1].st);
}
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org