Last active
April 25, 2020 10:45
-
-
Save Kurogoma4D/f31a2dcc76f88ed881510f21fed6f816 to your computer and use it in GitHub Desktop.
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
precision mediump float; | |
uniform float time; | |
uniform vec2 resolution; | |
vec3 gradient(vec2 p) { | |
return vec3(0.5, abs(clamp(p.y, -0.8, 0.8)) , 0.7); | |
} | |
void main(void) { | |
vec2 p = (gl_FragCoord.xy * 2.0 - resolution) / min(resolution.x, resolution.y); | |
float u = sin((atan(p.y, p.x) * 0.3 + tan(time)) * 20.0) * 0.01; | |
float col = 0.02 / abs(0.6 + u - length(p)); | |
float s = smoothstep(0.2, 1.8, cos(p.x)); | |
col += s; | |
vec3 base = vec3(col) * gradient(p) * smoothstep(0., 1., sin(time)); | |
gl_FragColor = vec4(base * vec3(0.4) + vec3(0.08, 0.11, 0.12), 1.0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment