AnsweredAssumed Answered

"Fragment Shader not supported by HW" on Radeon X1250

Question asked by fintelia on Jun 14, 2012
Latest reply on Jun 18, 2012 by gsellers

When I try to link the following GLSL shader on a Radeon X1250, I receive a "Fragment Shader not supported by HW" link error. It seems that the fwidth function is causes the problem (removing the function call fixes the problem), although fwidth function should be supported on all versions of GLSL.  I am running the latest drivers on Windows XP Professional. Is there any way get fwidth to work, or to detect specific hardware on which it will not?

 

Fragment Shader

#version 120

uniform vec4 color;

varying vec2 texCoord;

 

void main()

{

    float f = fwidth(texCoord.y);

    float r = 2.0 * length( texCoord - vec2(0.5,0.5) ) + f;

    gl_FragColor = color * vec4(1.0,1.0,1.0,1.0 - clamp(0.5*abs(1.0 - r)/f,0.0,1.0));

}

Outcomes