Last active
November 24, 2015 06:38
-
-
Save auxiliary-character/e05f0dd7e3517405e560 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
| uniform float iOvertoneVolume; | |
| void main() { | |
| vec2 z = (4*gl_FragCoord.xy)/iResolution.xy-2; | |
| vec2 c = vec2(iOvertoneVolume * 4, iOvertoneVolume * 4); | |
| int iter = 30; | |
| int i; | |
| for(i=0; i<iter; i++) { | |
| float x = (z.x * z.x - z.y * z.y) + c.x; | |
| float y = (z.y * z.x + z.x * z.y) + c.y; | |
| if((x * x + y * y) > 4.0) break; | |
| z.x = x; | |
| z.y = y; | |
| } | |
| gl_FragColor = vec4(0.0, cos(i), -cos(i), 1.0); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment