Last active
December 28, 2015 09:19
-
-
Save sortofsleepy/7477655 to your computer and use it in GitHub Desktop.
Fragment shader study #1
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 resolution; | |
void main(void){ | |
vec2 position = (gl_FragCoord.xy / resolution.xy); | |
float color = 0.0; | |
color += sin(position.y * cos(time / 15.0) * sin(80.0 / time)) + cos(position.y * cos(time / 15.0) * 10.0); | |
color += sin(position.y * sin(time / 10.0) * 40.0) + cos(position.x * cos(time / 25.0) * 40.0); | |
color += sin(position.x * sin(time / position.x) * 10.0) + sin(position.x * sin(time/35.0) * 80.0); | |
color *= sin(time/10.0) * 0.5; | |
gl_FragColor = vec4(color * position.x,tan(color) / position.y, sin(color) * time,asin(time)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment