Created
August 6, 2022 22:40
-
-
Save Iainmon/178f47de4dd7e83dc5cf765b96c1691b 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
const float rt = sqrt(2.); | |
float anim(float speed) { | |
return (.5*sin(iTime * speed)) + 0.5; | |
} | |
const vec3 paint = vec3(0.17, 0.55, 0.70); | |
void mainImage( out vec4 fragColor, in vec2 fragCoord ) | |
{ | |
vec2 uv = fragCoord/iResolution.xy; | |
uv -= vec2(.5); | |
uv.x *= iResolution.x / iResolution.y; | |
vec2 st = uv; | |
float zoom = 8.; | |
float r = 3. * anim(1.); // radius | |
float k = 80.; // falloff | |
float d = distance(length(st * zoom),r); | |
float g = 1./((k * pow(d,2.)) + 1.); | |
vec3 col = mix(paint,vec3(1.),g); | |
float b = smoothstep(r,r+0.03,length(zoom * st)); | |
col = mix(col,paint,b); | |
fragColor = vec4(col,1.0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Orange!