Hello, I have a little problem using texture coordinates with shader. The problem is, if I use a vertex program with varying for the fragment program, the texture coordinates seem to be incorrect, but if I just use the fragment program without the vertex program everything is fine. For example when computing shadows:
VERT ... vertex = gl_ModelViewMatrix * gl_Vertex; gl_TexCoord[0] = gl_MultiTexCoord0; gl_TexCoord[1] = gl_TextureMatrix[1] * vertex; ... FRAG ... float depth = shadow2DProj( shadowTexture, gl_TexCoord[1] ).x; ... this is not working. On texture unit 0 is the base texture, on 1 the shadowmap. But without the vertex program it is working. Anybody any hints? Thanks, Marcus _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

