Project_2026-01-31_17-08-17

GLSL shader by scry · created 2026-02-01 · updated 2026-02-03 · 10s loop · 2 passes

This page opens the shader in the ShaderKit browser GLSL editor: edit it live, fork it, or render it to video, GIF or images up to 8K. Also available as a full-screen view and an embeddable player.

Shader source (GLSL)

Common

#define pi acos(-1.)
#define deg pi/180.  //1 degree
#define time iTime*2.*pi/10. //sin(time) loops 10 seconds
#define R iResolution.xy //shorthand
#define ar R.x/R.y //aspect ratio
#define M iMouse //shorthand
#define xm (M.xy/R) //normalized mouse
#define nm ((xm.xy-0.5)*vec2(ar,1.)+0.5) //aspect ratio correction
vec3 cs = vec3(1.,2.,3.);
mat2 r2d(float a) {
    return mat2(cos(a),sin(a),-sin(a),cos(a));
}

Buffer A (iChannel0)

void mainImage(out vec4 fragColor, in vec2 fragCoord) {
    vec2 uv = fragCoord.xy / iResolution.xy;
    uv -= 0.5;
    uv.x *= ar;
    
    // Log-polar transformation for infinite zoom
    float r = length(uv);
    float a = atan(uv.y, uv.x);
    // Zoom speed: loop every 30 seconds
    float zoomSpeed = iTime * 2.0 * pi / 30.0;
    
    // Log-polar coords
    float logR = log(r) - zoomSpeed;
    
    // Multiple octaves for detail
    vec3 col = vec3(0.);
    float scale = 1.0;
    
    for(int i = 0; i < 4; i++) {
        vec2 p = vec2(logR, a) * scale;
        float pattern = sin(p.x * 3.0) * cos(p.y * 5.0);
        pattern += sin(p.x * 7.0 + p.y * 3.0) * 0.5;
        
        // Rainbow color based on spatial position (zoom level dependent)
        float hue = p.x * 0.5 + float(i) * 0.5;
        vec3 rainbow = vec3(
            0.5 + 0.5 * sin(hue),
            0.5 + 0.5 * sin(hue + 2.094),
            0.5 + 0.5 * sin(hue + 4.189)
        );
        
        col += rainbow * (0.5 + 0.5 * pattern) * (1.0 / scale);
        scale *= 2.0;
    }
    
    fragColor = vec4(col, 1.0);
}

Image

Not used

More shaders by scry

Browse all public shaders · All shaders by scry · ShaderKit home

Vibe Mode BETA
💰 ~0 credits
Uniforms
FPS: 0
Time: 0
Resolution: 0 x 0

Account

FPS: -- Time: -- --×-- 1x