Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: Shader compile problem on nVidia

  1. #1

    Shader compile problem on nVidia

    hi!

    I got a problem to get my shaders running on nvidia.
    the following code (FP) does work on ATI but not on nVidia:
    Code :
    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

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Jan 2001
    Location
    NVIDIA, Austin, TX
    Posts
    591

    Re: Shader compile problem on nVidia

    Internal assembly error is generally a compiler bug. Have you tried the latest NVIDIA drivers? It's possible this has already been fixed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •