Hi everyone,
we’re experiencing a problem with our little shader that just renders a texture on a screen aligne quad. We use RenderMonkey as developing tool.
Everything works right on my laptop, with a NVidia Fx 2500M.
But on other workstations with other graphic cards (Fx 1400, Fx5500 ) we see the entire rendered frame made of only one color…!
The shader code is so simple that I think I can paste it here:
varying vec2 texCoord[1];
void main(void)
{
vec2 inPos = sign(gl_Vertex.xy);
gl_Position = vec4(inPos.x, inPos.y, 0.0, 1.0);
texCoord[0] = (vec2(inPos.x, -inPos.y) + 1.0)/2.0;
}
uniform sampler2D Base2D;
uniform vec4 ColorGain;
varying vec2 texCoord;
void main(void)
{
vec4 rgb1 = texture2D(Base2D, texCoord );
gl_FragColor = clamp(vec4(rgb1.r + ColorGain.r, rgb1.g + ColorGain.g, rgb1.b + ColorGain.b, 1.0), 0.0, 1.0);
}
Do you have any suggestion?