unicorn Fart
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 (MAXIMUM BLING) ---
#define LAYERS 9.0 // KEEPS THAT INTENSE TEXTURE
#define SPEED iTime * 0.4
#define SHINE_POWER 4.0 // HOW "WET" OR "CHROME" IT LOOKS
#define SPARKLE_DENSITY 0.96 // ONLY THE BRIGHTEST SPARKS SURVIVE
// --- 2. THE MATH ENGINE (THE HOLOGRAPHIC GENERATOR) ---
mat2 rot(float a) { return mat2(cos(a), -sin(a), sin(a), cos(a)); }
// HIGH-FREQUENCY HASH (THE DIAMOND DUST)
float hash(vec2 p) {
p = fract(p * vec2(123.34, 456.21));
p += dot(p, p + 45.32);
return fract(p.x * p.y);
}
// SMOOTH NOISE
float noise(vec2 p) {
vec2 i = floor(p);
vec2 f = fract(p);
f = f * f * (3.0 - 2.0 * f);
float a = hash(i);
float b = hash(i + vec2(1.0, 0.0));
float c = hash(i + vec2(0.0, 1.0));
float d = hash(i + vec2(1.0, 1.0));
return mix(mix(a, b, f.x), mix(c, d, f.x), f.y);
}
// THE FRACTAL TEXTURE (THE "DENSE" PART)
float fbm(vec2 p) {
float v = 0.0;
float a = 0.5;
mat2 m = rot(1.2);
for (float i = 0.0; i < LAYERS; i++) {
v += a * noise(p);
p = m * p * 2.05; // INCREASE FREQUENCY FOR "TEENY TINY" DETAILS
a *= 0.5;
}
return v;
}
// THE HOLOGRAPHIC PALETTE (ALL THE COLORS)
vec3 holo_palette(float t) {
// A rainbow cycle offset to look like oil on water
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));
}
// --- 3. THE RENDERER (SILVER & SPARKLES) ---
void mainImage( out vec4 fragColor, in vec2 fragCoord ) {
// 1. Normalize
vec2 uv = (fragCoord * 2.0 - iResolution.xy) / iResolution.y;
// 2. DOMAIN WARPING (THE SWIRLY PART)
// This makes the texture flow like "Unicorn Farts"
vec2 q = vec2(0.0);
q.x = fbm(uv + 0.00 * iTime);
q.y = fbm(uv + vec2(1.0));
vec2 r = vec2(0.0);
r.x = fbm(uv + 1.0 * q + vec2(1.7, 9.2) + 0.15 * iTime);
r.y = fbm(uv + 1.0 * q + vec2(8.3, 2.8) + 0.126 * iTime);
float f = fbm(uv + r); // THE HEIGHT MAP
// 3. THE COLOR STRATEGY (WHITE/SILVER BASE + HOLO OVERLAY)
// Start with Silver/White base (High Brightness)
vec3 col = vec3(0.9, 0.95, 1.0) * f;
// Calculate the "Holographic" effect based on the warp
// This adds the Pinks, Teals, Oranges, Purples to the ridges
vec3 rainbow = holo_palette(length(q) + f);
// BLEND: The brighter the noise, the more "Silver" it gets.
// The mid-tones get the Rainbow.
col = mix(rainbow, vec3(1.0), f * f);
// 4. THE SHINY S*** (SPECULAR HIGHLIGHTS)
// We enhance the bright spots to look like wet chrome
float shine = pow(f, SHINE_POWER);
col += vec3(1.0) * shine * 1.5; // PURE WHITE REFLECTION
// 5. THE SPARKLE (DIAMOND SHRAPNEL)
// High-frequency noise thresholded to create glitter points
float spark = hash(uv * 100.0 + iTime); // Fast flickering
if (spark > SPARKLE_DENSITY) {
// If it sparkles, it is MAX BRIGHTNESS + Rainbow Tint
col += vec3(2.0) * holo_palette(spark);
}
// 6. FINAL POLISH (NO DULLNESS ALLOWED)
col = pow(col, vec3(0.9)); // Bright Gamma
// Extra "Unicorn Cloud" lift to kill any remaining dark spots
col = mix(col, vec3(1.0, 0.8, 0.9), 0.1);
fragColor = vec4(clamp(col, 0.0, 1.0), 1.0);
}
Image
Not used
More shaders by merrypranxter
- PRISMACORE_003 — Retina Banquet
- PRISMACORE_002 — After Work Sky
- PRISMACORE_001 — Liquid Crystal Fever Dream
- Hopf Vibratiok in pink
- Void Geode
- Project_2026-02-14_04-53-13
- Chromatic Plexus
- Signal Death
- Deep fried math
- Candy Interference
- Project_2026-02-12_21-16-32
- Project_2026-02-12_17-00-28
Browse all public shaders · All shaders by merrypranxter · ShaderKit home
Unread comments
×Projects with new comments. Click to open and read.