It worked

GLSL shader by merrypranxter · created 2026-02-09 · 10s loop · 2 passes

Gemini helped a lot lol

Tags: Fractal, Abstract, Symmetry, Animation

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)

// "Neon Glitch-Biology"
// A maximalist shader for Mary Gray
// Learning Concept: Iteration (Loops) & Color Palettes

// --- SETTINGS (PLAY WITH THESE NUMBERS) ---
#define REPETITIONS 4.0   // Complexity: Higher = more layers (Try 3.0 to 8.0)
#define GLITCH_SPEED 4.0  // Chaos: How fast it wiggles (Try 1.0 to 10.0)
#define NEON_INTENSITY 0.01 // Glow: Lower = tighter lines, Higher = blown out
#define ZOOM_SPEED 0.4    // Motion: How fast it flies at you

// This function creates that cool "oil slick" neon palette
// Based on your interest in "Spectral Thinking"
vec3 palette( float t ) {
    vec3 a = vec3(0.5, 0.5, 0.5);
    vec3 b = vec3(0.5, 0.5, 0.5);
    vec3 c = vec3(1.0, 1.0, 1.0);
    vec3 d = vec3(0.263, 0.416, 0.557); // <--- COLORS: Try changing these to (0.9, 0.1, 0.1) for Red/Hell
    return a + b*cos( 6.28318*(c*t+d) );
}

void mainImage( out vec4 fragColor, in vec2 fragCoord ) {
    
    // 1. Normalize coordinates (make the center of the screen 0,0)
    vec2 uv = (fragCoord * 2.0 - iResolution.xy) / iResolution.y;
    vec2 uv0 = uv; // Save the original position for later
    
    // 2. The "Glitch" Factor
    // This adds a weird wiggle based on time. 
    // It creates that "liquid glass" / "fluid instability" look from your notes.
    uv *= 1.0 + 0.1 * sin(uv.yx * GLITCH_SPEED + iTime); 
    
    vec3 finalColor = vec3(0.0);
    
    // 3. The Fractal Loop
    // We repeat this shape to make it look complex
    for (float i = 0.0; i < REPETITIONS; i++) {
        
        // Make space duplicate (kaleidoscope effect)
        uv = fract(uv * 1.5) - 0.5;

        float d = length(uv) * exp(-length(uv0));

        // 4. Color Logic
        vec3 col = palette(length(uv0) + i*.4 + iTime*ZOOM_SPEED);

        // 5. Make it glow (neon rings)
        d = sin(d*8. + iTime)/8.;
        d = abs(d);
        d = pow(NEON_INTENSITY / d, 1.2);

        finalColor += col * d;
    }
        
    fragColor = vec4(finalColor, 1.0);
}

Image

Not used

More shaders by merrypranxter

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

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

Account

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