texture scaling


Is a texture scaling ignored in a vertex program ?
Like doing this ?


I get it the usual way, in the vertex program

gl_TexCoord[0] = gl_MultiTexCoord0;

But somehow the scaling is ignored.

You will need to multiply the texture coordinates with the gl_TextureMatrix[]. This should behave similar to model transformations and the gl_ModelViewMatrix.
I hope this helps, I never used the texture matrix functionability myself…

When using a vertex shader or vertex program you need to apply the texture matrix yourself. In your case you would just do this:

gl_TexCoord[0] = gl_MultiTexCoord0 * gl_TextureMatrix[0];

Matrices in OpenGL are left-multiplied, here that’d be
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.