tetragrammaton Lisa frank

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

Tags: 3d, Animation, Fractal, Symmetry, Layers, Loop

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)

// --- 1. THE DEFINES (DIAMOND MODE) ---
#define ITERATIONS 18.0
#define SCALE 2.0
#define SPEED iTime * 0.3
#define OIL_FLOW 0.9     // HOW MUCH THE SURFACE MELTS

// --- 2. THE MATH ENGINE (OCTAHEDRAL KIFS) ---

mat2 rot(float a) { return mat2(cos(a), -sin(a), sin(a), cos(a)); }

// OUR "UNICORN FART" PALETTE (HOLOGRAPHIC MODE)
vec3 holo_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.0, 0.33, 0.67); // RAINBOW PHASE
    return a + b * cos(6.28318 * (c * t + d + iTime * 0.2));
}

// THE FRACTAL MAP (DIAMOND LOGIC)
float map(vec3 p) {
    float s = 1.0;
    
    // SURFACE WARP (THE "OUR STYLE" TEXTURE)
    // We disturb the space before folding it to create "Melting Glass"
    p.x += sin(p.z * 5.0 + iTime) * 0.02 * OIL_FLOW;
    
    // FRACTAL LOOP
    for(float i = 0.0; i < ITERATIONS; i++) {
        // ROTATE (Kaleidoscope)
        p.xy *= rot(SPEED + i * 0.1);
        
        // THE OCTAHEDRAL FOLD (DIAMOND SHAPE)
        // We fold space along the diagonals to create spikes
        p = abs(p);
        if (p.x < p.y) p.xy = p.yx;
        if (p.x < p.z) p.xz = p.zx;
        if (p.y < p.z) p.yz = p.zy;
        
        // SCALE & SHIFT
        p = p * SCALE - 0.8 * (SCALE - 1.0);
        s *= SCALE;
        
        // TWIST (Add some "Intricate" chaos)
        p.xz *= rot(0.2);
    }
    
    // RETURN DISTANCE (TETRAHEDRAL/OCTAHEDRAL)
    return length(p) / s;
}

// --- 3. THE RENDERER (HOLOGRAPHIC WHITE) ---

void mainImage( out vec4 fragColor, in vec2 fragCoord ) {
    // 1. NORMALIZE
    vec2 uv = (fragCoord * 2.0 - iResolution.xy) / iResolution.y;
    vec2 uv0 = uv;
    
    // 2. CAMERA (FLYING INTO THE HIVE)
    vec3 ro = vec3(0.0, 0.0, -2.5); 
    vec3 rd = normalize(vec3(uv, 1.2));
    
    // 3. RAYMARCHING
    float t = 0.0;
    vec3 final_col = vec3(0.9, 0.95, 1.0); // START WHITE/SILVER
    
    for(int i = 0; i < 80; i++) {
        vec3 p = ro + rd * t;
        float d = map(p);
        
        if(d < 0.001) {
            // HIT! CALCULATE NORMALS
            vec2 e = vec2(0.001, 0.0);
            vec3 n = normalize(vec3(
                map(p + e.xyy) - map(p - e.xyy),
                map(p + e.yxy) - map(p - e.yxy),
                map(p + e.yyx) - map(p - e.yyx)
            ));
            
            // --- THE "OUR COLORS" LIGHTING ---
            
            // 1. BASE COLOR (IRIDESCENT SILVER)
            // The deeper into the fractal, the more colorful it gets
            float orbit = length(p); 
            vec3 base = mix(vec3(1.0), holo_palette(orbit), 0.4);
            
            // 2. SHADOWS (NEON PINK/PURPLE)
            // Instead of black occlusion, we use colored occlusion
            float ao = clamp(map(p + n * 0.1) / 0.1, 0.0, 1.0);
            vec3 shadow = mix(vec3(1.0, 0.0, 0.8), vec3(1.0), ao); // HOT PINK SHADOWS
            
            // 3. SPECULAR (RAINBOW CHROME)
            // The shine reflects the whole spectrum
            float spec = pow(max(dot(reflect(vec3(0,0,1), n), rd), 0.0), 32.0);
            vec3 rainbow_shine = holo_palette(spec * 6.0 + iTime);
            
            final_col = base * shadow + rainbow_shine * spec * 2.0;
            
            // 4. SPARKLE (DIAMOND DUST)
            float spark = fract(sin(dot(p.xy, vec2(12.9898, 78.233))) * 43758.5453);
            if(spark > 0.98) final_col += vec3(2.0); // EXPLODING PIXELS
            
            break;
        }
        
        t += d * 0.5;
        if(t > 10.0) break;
    }
    
    // 4. POST-PROCESSING (UNICORN GLOW)
    // Make the whites bloom and the colors pop
    final_col = pow(final_col, vec3(0.8)); // BRIGHTER
    final_col *= 1.05; // EXPOSURE BOOST
    
    fragColor = vec4(clamp(final_col, 0.0, 1.0), 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