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?
uniform vec4 color;
varying vec2 texCoord;
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));