Created
December 9, 2011 02:15
-
-
Save slembcke/1449811 to your computer and use it in GitHub Desktop.
fwidth() AA
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#extension GL_OES_standard_derivatives : enable | |
varying lowp vec4 frag_color; | |
varying lowp vec2 frag_texcoord; | |
void main() | |
{ | |
#if GL_OES_standard_derivatives == 1 | |
gl_FragColor = frag_color*smoothstep(0.0, length(fwidth(frag_texcoord)), 1.0 - length(frag_texcoord)); | |
#else | |
gl_FragColor = frag_color; | |
#endif | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment