hi!
I got a problem to get my shaders running on nvidia.
the following code (FP) does work on ATI but not on nVidia:
uniform sampler2D tex;
uniform float focalPlane;
uniform float focalDist;
varying float dist;
void main(void)
{
vec4 texel = texture2D(tex, gl_TexCoord[0].st);
if (texel.a > 0.0) {
float a = abs(dist);
gl_FragColor.a = clamp(a, 0.0, 1.0);
} else {
discard;
}
}
it generates the following error-screen:
Error Screenshot
to me it seems like the shader compiler produces crap because it generates code, that reads from a variable where it’s not allowed to read from.
but maybe there’s also a really nasty problem with my code which I just don’t see here
thx for your help in advance!
styx