Last active
July 1, 2019 06:46
-
-
Save ELI7VH/0ef038ebf00dbdc6e34b568634d14179 to your computer and use it in GitHub Desktop.
Outrun Sun Fragment Shader
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
uniform float time; | |
varying vec2 vUv; | |
void main() { | |
vec3 color = vec3(1.0); | |
float sun = step(mod(vUv.y * 20. + time, 1.), -0.2 + 0.35 * vUv.y * 3.7); | |
color.x *= sun; | |
color.y *= sun * (0.6 + vUv.y - 0.7 ); | |
color.z = 0.; | |
gl_FragColor = vec4(color, 1.); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment