| 1 |
// Created by inigo quilez - iq/2014 |
| 2 |
// License Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. |
| 3 |
|
| 4 |
void mainImage(out vec4 fragColor, in vec2 fragCoord) |
| 5 |
{ |
| 6 |
vec2 z = 1.15*(-iResolution.yx + 2.0*fragCoord.yx) / iResolution.y; |
| 7 |
|
| 8 |
vec2 an = 0.51*cos(vec2(0.0, 1.5708) + 0.1*iGlobalTime) - 0.25*cos(vec2(0.0, 1.5708) + 0.2*iGlobalTime); |
| 9 |
|
| 10 |
float f = 1e20; |
| 11 |
for (int i = 0; i<17; i++) |
| 12 |
{ |
| 13 |
z = vec2(z.x*z.x - z.y*z.y, 2.0*z.x*z.y) + an; |
| 14 |
f = min(f, dot(z, z)); |
| 15 |
} |
| 16 |
|
| 17 |
f = 1.0 + log(f) / 16.0; |
| 18 |
|
| 19 |
fragColor = 1.0 - vec4(f, f*f, f*f*f, 0.0); |
| 20 |
} |