Wilczek

gl_TextureMatrix[x] is initialized with zeros on desktop ATI/AMD GPUs only

Discussion created by Wilczek on Oct 15, 2010
Latest reply on Oct 21, 2010 by Wilczek

Hi,

In vertex shaders in case of ATI/AMD desktop (only) GPUs the gl_TextureMatrix[index] is initialized with zeros resulting all texture coordinates to be 0.
That means the following lines will always return (0,0,) texture coordinates:
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
gl_TexCoord[1] = gl_TextureMatrix[1] * gl_MultiTexCoord1;
gl_TexCoord[2] = gl_TextureMatrix[2] * gl_MultiTexCoord2;

However, the above mentioned lines give back correct texture coordinates on mobility ATI/AMD Radeon GPUs and on all nVidia GPUs. (Correct results: Mobility Radeon X1100 series, Mobility Radeon X1400 series, Mobility Radeon HD4570, fails on for sure: Desktop HD5xxx Series, Desktop HD 4850 with any drivers, and works with all nVidia GPUs from desktop FX5200 till the latest nV GPUs + on nV mobile solutions too).

In the code I set up the texture matrix for every texture (using glActiveTexture...(...); glMatrixMode(GL_TEXTURE); glLoadIdentity(); Other texture transformations; ).

In case you would like to debug/have a look at the shaders + binary, I can send a link to a zip file.

My questions:
1. why does it work with Mobility ATI/AMD GPUs and on all nV GPUs?
2. why do I get zero texture matrices in case of Desktop ATI/AMD GPUs and not on Mobility ATI/AMD GPUs?

Thank you and best regards,
Wilczek

Outcomes