Created
May 3, 2013 10:01
-
-
Save rgngl/5508302 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
#ifdef GL_ES | |
precision mediump float; | |
#endif | |
uniform float time; | |
uniform vec2 mouse; | |
uniform vec2 resolution; | |
// Leadlight by @hintz 2013-05-02 | |
void main() | |
{ | |
vec2 position = gl_FragCoord.xy / resolution.xx - mouse; | |
float r = length(position); | |
float a = atan(position.y, position.x); | |
float t = time + 100.0/(r+1.0); | |
float light = 15.0*abs(0.05*(sin(t)+sin(time+a*8.0))); | |
vec3 color = vec3(-sin(r*5.0-a-time+sin(r+t)), sin(r*3.0+a-time+sin(r+t)), cos(r+a*2.0+a+time)-sin(r+t)); | |
gl_FragColor = vec4((normalize(color)+0.9) * light , 1.0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment