|
|
@ -2,19 +2,20 @@ |
|
|
|
out vec4 pixColor; |
|
|
|
out vec4 pixColor; |
|
|
|
|
|
|
|
|
|
|
|
uniform int iterationCount; |
|
|
|
uniform int iterationCount; |
|
|
|
|
|
|
|
uniform float divergeThreshold; |
|
|
|
|
|
|
|
|
|
|
|
in vec2 complexPos; |
|
|
|
in vec2 complexPos; |
|
|
|
|
|
|
|
|
|
|
|
vec2 mul(in vec2 a, in vec2 b) { |
|
|
|
|
|
|
|
return vec2(a.x * b.x - a.y * b.y, a.y * b.x + a.x * b.y); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vec3 getColor(in float value){ |
|
|
|
vec3 getColor(in float value){ |
|
|
|
vec3 red = vec3(0.5, 0, 0); |
|
|
|
vec3 red = vec3(0.5, 0, 0); |
|
|
|
vec3 blue = vec3(0, 0, 0.5); |
|
|
|
vec3 blue = vec3(0, 0, 0.5); |
|
|
|
return value * red + (1 - value) * blue; |
|
|
|
return value * red + (1 - value) * blue; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vec2 square(in vec2 c){ |
|
|
|
|
|
|
|
return vec2(c.x * c.x - c.y * c.y, 2 * c.x * c.y); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void main(){ |
|
|
|
void main(){ |
|
|
|
|
|
|
|
|
|
|
|
vec2 z; |
|
|
|
vec2 z; |
|
|
|