

void mainImage(out vec4 fragColor, in vec2 fragCoord)
{
    // Normalized coordinates
    vec2 uv = fragCoord / iResolution.xy;

    // Time variable
    float time = iTime;

    // Distortion parameters
    float distortionAmount = 0.2;
    float speed = 2.0;

    // Distorted UV coordinates
    vec2 distortedUV = uv + distortionAmount * vec2(sin(speed * uv.y + time), cos(speed * uv.x + time));

    // Circular pattern
    float radius = 0.4;
    vec2 center = vec2(0.5);
    vec2 delta = distortedUV - center;
    float distance = length(delta);
    float angle = atan(delta.y, delta.x);
    float circularPattern = sin(distance * 10.0 - time * 2.0) * sin(angle * 10.0 + time * 2.0);

    // Color calculation
    vec3 color = vec3(
        0.5 + 0.5 * sin(time + circularPattern),
        0.5 + 0.5 * sin(time + circularPattern + 2.0),
        0.5 + 0.5 * sin(time + circularPattern + 4.0)
    );

    // Output the final color
    fragColor = vec4(color, 1.0);
}
