Bruno
November 30, 2004, 12:27am
1
Hi,
Is a texture scaling ignored in a vertex program ?
Like doing this ?
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
glScalef(8,8,8);
glMatrixMode(GL_MODELVIEW);
I get it the usual way, in the vertex program
gl_TexCoord[0] = gl_MultiTexCoord0;
But somehow the scaling is ignored.
def
November 30, 2004, 1:01am
2
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…
jra101
November 30, 2004, 4:50am
3
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];
Relic
November 30, 2004, 5:49am
4
Matrices in OpenGL are left-multiplied, here that’d be
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
system
Closed
October 19, 2021, 7:49pm
5
This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.