Created
October 19, 2011 08:59
-
-
Save jbilcke/1297784 to your computer and use it in GitHub Desktop.
Anti-aliased circle in GLSL (eg. WebGL)
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
void main(void) { | |
vec2 pos = mod(gl_FragCoord.xy, vec2(50.0)) - vec2(25.0); | |
gl_FragColor = mix(vec4(.90, .90, .90, 1.0), vec4(.20, .20, .40, 1.0), smoothstep(380.25, 420.25, dot(pos, pos))); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment