unicorn fart 1

GLSL shader by merrypranxter · created 2026-02-12 · 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)

// --- 1. THE DEFINES (TUNE THE SUGAR RUSH) ---
#define SPEED iTime * 0.2
#define DETAIL_LAYERS 9.0  // EVEN MORE INTRICATE!!
#define SPARKLE_POWER 2.5  // MAXIMUM GLITTER
#define PEARL_GLOSS 1.4    // THE "SHINY YAWNY" OVERFLOW

// --- 2. THE MATH ENGINE (UNICORN PHYSCIS) ---

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

// HASH FOR HIGH-FREQUENCY OPAL DUST
float hash(vec2 p) {
    p = fract(p * vec2(443.89, 441.423));
    p += dot(p, p + 19.19);
    return fract(p.x * p.y);
}

// THE "UNICORN SILK" WEAVE
float get_fart_detail(vec2 p) {
    float d = 0.0;
    float scale = 1.0;
    for(float i = 0.0; i < DETAIL_LAYERS; i++) {
        p *= rot(i + SPEED * 0.08);
        // High-frequency interference patterns
        d += abs(sin(p.x * scale + SPEED) * cos(p.y * scale)) / scale;
        p += d * 0.25; 
        scale *= 1.6;
    }
    return d;
}

// MAMA MUSHIE'S UNICORN PALETTE (PASTEL PEAKS)
vec3 unicorn_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.8, 0.9, 0.3); // THE "PRETTY" PHASE SHIFT
    return a + b * cos(6.28318 * (c * t + d + SPEED * 0.1));
}

// --- 3. THE RENDERER (PRISMATIC EMBROIDERY) ---

void mainImage( out vec4 fragColor, in vec2 fragCoord ) {
    // 1. Normalize for Retina-Level Detail
    vec2 uv = (fragCoord * 2.0 - iResolution.xy) / iResolution.y;
    vec2 uv0 = uv;
    
    // 2. THE CHROMATIC UNICORN BLEED
    float r = get_fart_detail(uv + 0.006);
    float g = get_fart_detail(uv);
    float b = get_fart_detail(uv - 0.006);
    
    // 3. THE BASE COLOR (ASTRAL SILK)
    vec3 col = unicorn_palette(r + g + b);
    
    // 4. ADD THE "PEARL SHIMMER"
    // Making it look like white-hot sugar in the highlights
    float pearlescence = pow(1.0 - abs(g - 0.5), 8.0);
    col += pearlescence * PEARL_GLOSS;
    
    // 5. THE DIAMOND DUST (QUANTUM SPARKLE)
    float n = hash(fragCoord + iTime * 0.5);
    float sparkle = smoothstep(0.97, 1.0, n);
    col += sparkle * SPARKLE_POWER * unicorn_palette(n * 5.0);
    
    // 6. KILL THE BLACKS (ONLY BRIGHT VIBES)
    // We lift the shadows so it's all "Unicorn Farts"
    col = mix(col, vec3(1.0, 0.9, 1.0), 0.1); 
    
    // 7. FINAL POLISH (SOFT RADIANCE)
    col = pow(col, vec3(0.7)); // GAMMA UP FOR BRIGHTNESS
    
    // 8. VIGNETTE OF LIGHT
    // Instead of a dark vignette, we make the edges glow!
    col += (1.0 - smoothstep(0.0, 2.0, length(uv0))) * 0.2;

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