LF texture 1

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

Tags: Abstract

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)

// "The Electric Trapper Keeper"
// A Lisa Frank-inspired acid pattern generator
// Concept: Domain Warping + Hard contours for a "Vector Art" look

// --- 🎛️ PATTERN KNOBS ---
#define ZOOM 3.0           // How big the pattern is
#define LIQUIDITY 2.0      // How much it swirls (Higher = more melting)
#define COMPLEXITY 4.0     // How many layers of swirls
#define SPEED 0.2          // How fast it flows

// --- 🦄 THE "LISA FRANK" PALETTE ---
// This palette forces high-saturation Pinks, Cyans, and Yellows
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); // Frequency (keep high for rainbows)
    vec3 d = vec3(0.00, 0.33, 0.67); // Phase (RGB spacing)
    
    // We boost the result to make it "Acidic"
    return pow(a + b*cos( 6.28318*(c*t+d) ), vec3(0.6)); 
}

void mainImage( out vec4 fragColor, in vec2 fragCoord ) {
    
    // 1. Setup
    vec2 uv = (fragCoord * 2.0 - iResolution.xy) / iResolution.y;
    vec2 uv0 = uv; // Save original coordinates
    vec3 finalColor = vec3(0.0);
    
    // 2. The Domain Warping Loop
    // This loops creates the "Paisley" or "Oil Slick" shapes
    for (float i = 0.0; i < COMPLEXITY; i++) {
        
        // This is the magic line.
        // We add a sine wave to the coordinate system itself.
        // This means we aren't drawing a wave, we are BENDING space like a wave.
        uv.x += sin(uv.y * LIQUIDITY + iTime * SPEED);
        uv.y += cos(uv.x * LIQUIDITY - iTime * SPEED);
        
        // Zoom out a bit each layer
        uv *= 1.1; 
    }
    
    // 3. Create the Pattern
    // We use the warped UVs to create a distance field
    float d = sin(uv.x * ZOOM) * sin(uv.y * ZOOM);
    
    // 4. "Vector Art" Hard Edges
    // Instead of a smooth glow, we use 'smoothstep' to create hard bands of color
    // This makes it look like a print or a sticker
    float d1 = smoothstep(-0.2, 0.2, d);
    float d2 = smoothstep(0.4, 0.5, sin(length(uv0)*5.0 - iTime)); // Interference ring
    
    // 5. Coloring
    // We mix the pattern shape (d) with the original position (uv0) for color
    float colorIndex = length(uv0) + d * 0.5 + iTime * 0.2;
    vec3 col = palette(colorIndex);
    
    // 6. The Glitch: Chromatic Aberration
    // We shift the colors slightly based on the pattern intensity
    col.r += 0.05 * sin(d * 10.0);
    col.b -= 0.05 * cos(d * 10.0);
    
    // Invert parts of the pattern for high contrast
    if (d > 0.5) col = 1.0 - col;

    fragColor = vec4(col, 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