varying vec4 xlv_TEXCOORD0; void main () { vec4 res; res.x = dFdx (xlv_TEXCOORD0.x); res.y = dFdx (xlv_TEXCOORD0.y); res.zw = fwidth (xlv_TEXCOORD0.xy); gl_FragData[0] = res; }