#version 410 uniform sampler2D texture1; in vec2 uvV; out vec4 fragColor; void main (void) { vec4 p = texture(texture1, uvV); // Z^2 + C. vec2 C = uvV; vec2 Z = p.xy; // x is real part, y is imaginary part. vec2 Z2 = vec2(Z.x * Z.x - Z.y * Z.y, 2.0 * Z.x * Z.y) + C; fragColor = vec4(p.xy + vec2(0.5, 0.5), 0.0, 1.0); }