Last active
September 12, 2019 23:40
-
-
Save sortofsleepy/f936ac1fba253742f0010615ee2bd2af to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| vec2 uv = gl_FragCoord.xy; | |
| //uv = fragCoord.xy / iResolution.xy; | |
| uv.y -= u_RenderSize.y / 2.0; | |
| uv.x -= u_RenderSize.x / 2.0; | |
| vec2 coords = uv; | |
| vec4 color = vec4(1.0,1.0,0.0,1.0); | |
| float radius = 20.0; | |
| vec2 center = vec2(0.); | |
| float sD = distance(coords, center); | |
| float a = 1.0 - clamp(sD - radius + .5, 0.0, 1.0); | |
| gl_FragColor = mix(gl_FragColor,color,a * color.a); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment