View Full Version : Shader compile problem on nVidia

01-07-2007, 10:29 PM

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 {
}it generates the following error-screen:
Error Screenshot (http://w3studi.informatik.uni-stuttgart.de/~schillas/error.png)

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!


01-08-2007, 10:35 AM
Internal assembly error is generally a compiler bug. Have you tried the latest NVIDIA drivers? It's possible this has already been fixed.