1 Reply Latest reply on Apr 7, 2009 6:33 AM by avk

    Problem with GLSL shader on Radeon HD 2600 Pro with Catalyst 9.3 on Windows XP SP3

    Ized

      Hello! After succesfully compiled GLSL shader, I try to render geometry with it and I get access violation at 0x7C9369B2 address. I see that this address is placed in ntdll.dll, hypotheticaly in RtlInitializeCriticalSection.

      Shaders are:

      [vertex]

      varying vec2 st;

      void main()
      {
          st = gl_MultiTexCoord0.st;
          gl_FrontColor = gl_Color;
          gl_Position = ftransform();
      }

      [fragment]

      uniform sampler2D t0;
      uniform sampler2D t1;
      uniform float time;

      varying vec2 st;

      void main()
      {
          vec4 c0 = texture2D(t0, st);
          vec2 xy = st - vec2(mod(time, 1.0) / .5 - 1.0, .0);
          xy.x = clamp(xy.x, .0, 1.);
          vec4 c1 = texture2D(t1, xy);
          float a = smoothstep(.5, .0, abs(xy.x - .5));
          a *= c0.a * c1.a;
          a *= smoothstep(.5, .47, abs(.5 - xy.y));
          a *= .9 * step(4.0, mod(time, 5.0));
          gl_FragColor = mix(c0, c1, a) * gl_Color;
      }

       

      GPU ShaderAnalyzer produces code (in other cases I can get "hardware compilling error")

       

      So, please answer what I do wrong.