PickleWorld
10-11-2007, 02:13 PM
I am having some problems accessing 1D texture coordinates in a fragment program. I am using a very simple program to test it...
Vertex Program calls...
gl_TexCoord[0] = gl_MultiTexCoord0;
gl_Position = ftransform();
Fragment Programs calls...
vec3 finalColor = vec3(gl_TexCoord[0].s, 0.0, 0.0);
gl_FragColor = vec4(finalColor, 1.0);
If I use gl_TexCoord[0].s I get black, if I use gl_TexCoord[0].t I get red (ie 0 and 1). Am I doing something wrong?
p.s. my texture coordinates work fine in fixed pipeline.
Vertex Program calls...
gl_TexCoord[0] = gl_MultiTexCoord0;
gl_Position = ftransform();
Fragment Programs calls...
vec3 finalColor = vec3(gl_TexCoord[0].s, 0.0, 0.0);
gl_FragColor = vec4(finalColor, 1.0);
If I use gl_TexCoord[0].s I get black, if I use gl_TexCoord[0].t I get red (ie 0 and 1). Am I doing something wrong?
p.s. my texture coordinates work fine in fixed pipeline.