runnable fragment

20260106

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
// Enhanced Topology Shader for TouchDesigner
// Features: Klein bottle, Möbius forms, iridescence, bloom, subsurface scattering

#define fragColor gl_FragColor
uniform float u_time;
uniform vec2  u_resolution;

// Original color palette - topology theme (preserved)
const vec3 color1 = vec3(0.212, 0.176, 0.471); // #362d78 deep violet
const vec3 color2 = vec3(0.322, 0.247, 0.639); // #523fa3 royal purple
const vec3 color3 = vec3(0.569, 0.424, 0.800); // #916ccc lavender
const vec3 color4 = vec3(0.741, 0.631, 0.898); // #bda1e5 soft lilac
const vec3 color5 = vec3(0.784, 0.753, 0.914); // #c8c0e9 pale violet
runnable fragment

20260117

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
#define TDOutputSwizzle(c) (c)
// TouchDesigner GLSL TOP - Ethereal Garden
// Organic flowing forms with enhanced animations

uniform float u_time;
uniform vec2 u_resolution;

#define PI 3.14159265359
#define TAU 6.28318530718
#define PHI 1.61803398875

#define MAX_STEPS 100
#define MAX_DIST 80.0
runnable fragment

20260121

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
#define TDOutputSwizzle(c) (c)
// TouchDesigner GLSL TOP - Celtic Sacred Geometry
// Black & white sacred geometry with Celtic knot patterns

uniform float u_time;
uniform vec2 u_resolution;

#define PI 3.14159265359
#define TAU 6.28318530718

// ============================================
// UTILITY FUNCTIONS
// ============================================
runnable fragment

20260127

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
#define TDOutputSwizzle(c) (c)
// TouchDesigner GLSL TOP - Sacred Geometry: Celestial Temple
// Deep violet → celestial blue | Ancient math + otherworldly beauty
// Domain warping, aurora, mandala, god rays, chromatic bloom

uniform float u_time;
#define fragColor gl_FragColor

#define PI  3.14159265359
#define TAU 6.28318530718
#define PHI 1.61803398875

// ── Palette ────────────────────────────────────────────────
runnable fragment

20260203

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
#define TDOutputSwizzle(c) (c)
// TouchDesigner GLSL TOP - Ethereal Mathematical Garden III
// Black & White | Sacred geometry, organic flows, crystalline dreams
// Ultimate edition: Metatron's Cube, peacock feathers, snowflakes, galaxies

uniform float u_time;
#define fragColor gl_FragColor

#define PI 3.14159265359
#define TAU 6.28318530718
#define PHI 1.618033988749
#define SQRT3 1.732050808
runnable fragment

20260209

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
#define TDOutputSwizzle(c) (c)
// TouchDesigner GLSL TOP - Raymarched Triply Periodic Minimal Surfaces
// Morphing Gyroid ↔ Schwarz P ↔ Schwarz Diamond
// Palette: Deep indigo → lavender → sky blue → dark teal

uniform float u_time;
#define fragColor gl_FragColor

// ─── Color Palette (10 colors) ───────────────────────────
const vec3 PAL[10] = vec3[10](
    vec3(0.212, 0.176, 0.471),  // #362d78 deep indigo
    vec3(0.322, 0.247, 0.639),  // #523fa3 purple
    vec3(0.569, 0.424, 0.800),  // #916ccc medium purple
runnable fragment

20260219

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
uniform float u_time;
uniform vec2  uRes;      // TD Vectors1 — e.g. 1280.0  720.0
uniform float uDepth;    // water depth darkness  [0.2–0.8]  default 0.45
uniform float uSpeed;    // animation speed       [0.3–2.0]  default 1.0
uniform float uRayInt;   // god-ray intensity     [0.0–1.5]  default 0.7
uniform float uGlow;     // bioluminescence       [0.0–1.0]  default 0.35
uniform float uHaze;     // water turbidity       [0.0–1.0]  default 0.3
#define fragColor gl_FragColor

// ── palette ───────────────────────────────────────────────────────────────
#define C_DEEP_P   vec3(0.212, 0.176, 0.471)  // #362d78
#define C_MID_P    vec3(0.322, 0.247, 0.639)  // #523fa3
#define C_BRIGHT_P vec3(0.569, 0.424, 0.800)  // #916ccc
runnable fragment

20260227

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
// uVars = absTime  →  TD auto-declares this from Vectors tab (Type: float)
// DO NOT redeclare uniforms here — TD injects them automatically.

// ─── Mathematical Particle Art ──────────────────────────────────────
// Each particle is assigned a unique (u, v) position on a parametric
// surface. The formula f(u, v, t) defines the entire visual character.
// ─────────────────────────────────────────────────────────────────────

#define PI  3.14159265359
#define TAU 6.28318530718

mat2 rot(float a) {
    float s = sin(a);
runnable fragment

20260302

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
// uVars = absTime  →  TD auto-declares this from Vectors tab (Type: float)
// DO NOT redeclare uniforms here — TD injects them automatically.

// ─── Superformula Particle Art ───────────────────────────────────────
#define PI  3.14159265359
#define TAU 6.28318530718

float superformula(float theta, float m, float n1, float n2, float n3) {
    float a = pow(abs(cos(m * theta / 4.0)), n2);
    float b = pow(abs(sin(m * theta / 4.0)), n3);
    float r = pow(a + b, -1.0 / n1);
    return r;
}
runnable fragment

20260304

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
// TouchDesigner injects uVars from the Vectors tab.
// Create Cd as a float3 attribute in the Create Attributes tab.

#define PI  3.14159265359
#define TAU 6.28318530718

const vec3 COL_0 = vec3(0.039216, 0.058824, 0.050980); // #0a0f0d
const vec3 COL_1 = vec3(0.050980, 0.129412, 0.215686); // #0d2137
const vec3 COL_2 = vec3(0.101961, 0.101961, 0.180392); // #1a1a2e
const vec3 COL_3 = vec3(0.050980, 0.231373, 0.180392); // #0d3b2e
const vec3 COL_4 = vec3(0.000000, 1.000000, 0.529412); // #00ff87
const vec3 COL_5 = vec3(0.000000, 0.831373, 1.000000); // #00d4ff
const vec3 COL_6 = vec3(0.482353, 0.184314, 1.000000); // #7b2fff
runnable fragment

20260309

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
uniform float u_time;
uniform vec2  uRes;      // TD resolution — e.g. 1920  1080
uniform float uSpeed;    // animation speed       [0.3–2.0]  default 1.0
uniform float uGlow;     // glow / emission       [0.0–1.5]  default 0.8
uniform float uPulse;    // music pulse energy    [0.0–1.0]  default 0.5
uniform float uFog;      // depth fog density     [0.0–1.0]  default 0.35
#define fragColor gl_FragColor

// ── Hatsune Miku palette ─────────────────────────────────────────────────
#define C_MIKU    vec3(0.224, 0.773, 0.733)   // #39C5BB  iconic teal
#define C_MIKU_D  vec3(0.090, 0.320, 0.320)   // deep teal shadow
#define C_MIKU_L  vec3(0.400, 0.920, 0.880)   // light teal highlight
#define C_PINK    vec3(0.953, 0.361, 0.529)   // #F35C87  accent pink
runnable fragment

20260312

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
uniform float u_time;
uniform vec2  uRes;
uniform float uSpeed;    // [0.3–2.0]  default 1.0
uniform float uGlow;     // [0.0–2.0]  default 1.0
uniform float uPulse;    // [0.0–1.0]  default 0.5
uniform float uFog;      // [0.0–1.0]  default 0.35
#define fragColor gl_FragColor

#define PI      3.14159265
#define TAU     6.28318530

// ── rotation ─────────────────────────────────────────────────────────────
mat3 rotX(float a){float c=cos(a),s=sin(a);return mat3(1,0,0,0,c,-s,0,s,c);}
runnable fragment

20260316

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
uniform float u_time;
uniform vec2  uRes;

#define fragColor gl_FragColor

#define PI  3.14159265
#define TAU 6.28318530

// ── Palette ──────────────────────────────────
vec3 cBg1     = vec3(0.161, 0.188, 0.224);
vec3 cBg2     = vec3(0.157, 0.212, 0.192);
vec3 cDeep1   = vec3(0.051, 0.122, 0.176);
vec3 cDeep2   = vec3(0.039, 0.239, 0.180);
runnable fragment

20260324

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
uniform float u_time;
uniform vec2  uRes;

#define fragColor gl_FragColor

// ── Mathematical Surface: Schwarz-D Minimal Surface ──
// The Schwarz Diamond surface is a triply-periodic minimal surface
// discovered by Hermann Schwarz in 1865. It divides space into two
// congruent labyrinths related by a translation.
//
// Formula: sin(x)*sin(y)*sin(z) + sin(x)*cos(y)*cos(z)
//        + cos(x)*sin(y)*cos(z) + cos(x)*cos(y)*sin(z) = 0
runnable fragment

20260327

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
#define TDOutputSwizzle(c) (c)
uniform float u_time;
uniform vec2 u_resolution;

#define fragColor gl_FragColor

#define PI  3.14159265
#define TAU 6.28318530
#define PHI 1.61803398
#define S3  0.86602540

// ── helpers ───────────────────────────────────────────────────────────────────
runnable fragment

20260403

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
// ============================================================
// Babylonian Fibonacci — Sacred Geometry + Pink Dots Edition
// TouchDesigner GLSL TOP
// ============================================================

uniform float iTime;
uniform vec2  iResolution;

layout(location = 0) #define fragColor gl_FragColor

// --- Color Palette (mandatory) ---
const vec3 cBg1    = vec3(0.161, 0.188, 0.224);
const vec3 cBg2    = vec3(0.157, 0.212, 0.192);
runnable fragment

20260404

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
// ============================================================
//  QUANTUM LATTICE — 3D Raymarched Sacred Geometry
//  TouchDesigner GLSL TOP  ·  Theme: Deep Space Neon
//  Uniforms: connect Timer CHOP → iTime
// ============================================================

uniform float iTime;
uniform vec2  iResolution;
layout(location = 0) #define fragColor gl_FragColor

// ─── Palette ──────────────────────────────────────────────────
const vec3 cBg1    = vec3(0.039, 0.059, 0.051);
const vec3 cBg2    = vec3(0.051, 0.129, 0.216);
runnable fragment

20260409

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
#define TDOutputSwizzle(c) (c)

uniform float iTime;
layout(location = 0) #define fragColor gl_FragColor

// ─── Palette ──────────────────────────────────────────────────
const vec3 cBg1    = vec3(0.039, 0.059, 0.051);
const vec3 cBg2    = vec3(0.051, 0.129, 0.216);
const vec3 cBg3    = vec3(0.102, 0.102, 0.180);
const vec3 cGreen  = vec3(0.000, 1.000, 0.529);
const vec3 cCyan   = vec3(0.000, 0.831, 1.000);
const vec3 cPurple = vec3(0.482, 0.184, 1.000);
const vec3 cPink   = vec3(1.000, 0.176, 0.478);
runnable fragment

20260415

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
#define TDOutputSwizzle(c) (c)

uniform float iTime;
layout(location = 0) #define fragColor gl_FragColor

#define TAU  6.28318530718
#define PI   3.14159265359

// ─── Palette (black ink on white) ────────────────────────────
const vec3 cWhite  = vec3(1.000, 1.000, 1.000);
const vec3 cBlack  = vec3(0.000, 0.000, 0.000);
const vec3 cGold   = cBlack;
const vec3 cRose   = cBlack;
runnable fragment

20260420

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
#define TDOutputSwizzle(c) (c)
// === SACRED BLOOM — TouchDesigner GLSL TOP ===
// Uniforms (add in GLSL TOP → Vectors tab):
//   iTime    (float, 1x1)  ← Timer CHOP
//   iMode    (float, 1x1)  ← 0..4 pattern selector
//   iWarp    (float, 1x1)  ← 0..1 kaleido mix
//   iBeat    (float, 1x1)  ← 0..1 audio/pulse input

#define fragColor gl_FragColor
uniform float iTime;
uniform float iMode;
uniform float iWarp;
uniform float iBeat;
runnable fragment

20260426

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
#define TDOutputSwizzle(c) (c)
// ============================================================
// SACRED MANDALA — layered geometry, single living composition
// TouchDesigner GLSL TOP — 20260426
// Required uniforms (Vectors tab):
//   iTime  (float, 1x1)  ← Timer CHOP
// Optional (declare in TD as separate float uniforms; default 0 if unbound):
//   iWarp  (float, 1x1)  ← 0..1 extra kaleido boost over baseline 0.55
//   iBeat  (float, 1x1)  ← 0..1 pulse input (zoom + chromatic flash)
// ============================================================

uniform float iTime;
uniform float iWarp;
runnable fragment

20260503

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
#define TDOutputSwizzle(c) (c)
// ============================================================
// AURORA NEBULA — flowing volumetric ribbons & cosmic dust
// TouchDesigner GLSL TOP — 20260503
// Required uniforms (Vectors tab):
//   iTime  (float, 1x1)  ← Timer CHOP
// Optional (declare in TD as separate float uniforms; default 0 if unbound):
//   iWarp  (float, 1x1)  ← 0..1 extra turbulence over baseline
//   iBeat  (float, 1x1)  ← 0..1 pulse input (bloom + chromatic flash)
// Palette intentionally identical to 20260426 (Sacred Mandala).
// ============================================================

uniform float iTime;
runnable fragment

20260507

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
#define TDOutputSwizzle(c) (c)
// ===============================================================
// COMB JELLY (Ctenophora) — photoreal hybrid renderer
// 3D raymarched gelatinous body + 2D cilia network overlay
// with depth-aware translucency, subsurface scatter, caustics,
// marine-snow particles, refraction shimmer, deep-sea lighting.
// TouchDesigner GLSL TOP · 1080x1920 (Reels)
// ===============================================================

#define fragColor gl_FragColor
uniform float iTime;

#define ROWS         8
runnable fragment

20260512

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
#define TDOutputSwizzle(c) (c)
// ===============================================================
// ABYSSAL VEIL JELLY — deep-sea shader creature
// 3D raymarched translucent bell + procedural oral arms + veil
// TouchDesigner GLSL TOP · 1080x1920 (Reels)
// Keeps original color constants exactly.
// ===============================================================

#define fragColor gl_FragColor
uniform float iTime;

#define MAX_STEPS    80
#define MAX_DIST     9.0
runnable fragment

20260518

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
#define TDOutputSwizzle(c) (c)
// ===============================================================
// CAMBRIAN RELIC — Marrella Model v3.1 Stable
// TouchDesigner GLSL TOP
// Stable Marrella silhouette:
// slender carapace + four horn spines + ventral legs + shorter antennae
// Keeps original color constants exactly.
// ===============================================================

#define fragColor gl_FragColor
uniform float iTime;

#define MAX_STEPS    112
runnable fragment

20260522

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
#define TDOutputSwizzle(c) (c)
// ===============================================================
// CAMBRIAN RELIC — Anomalocaris Model v1.1
// TouchDesigner GLSL TOP
// Flattened radiodont body + overlapping swimming flaps + tail fan
// + stalked compound eyes + oral cone + paired frontal appendages.
// Original neon color constants are preserved exactly.
// ===============================================================

#define fragColor gl_FragColor
uniform float iTime;

#define MAX_STEPS    124
runnable fragment

20260531

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
#define TDOutputSwizzle(c) (c)
// ===============================================================
// CAMBRIAN RELIC - Pikaia Neon Chordate v1.3
// TouchDesigner GLSL TOP
// Slender chordate body + luminous dorsal ribbon + tail lance
// + repeating myomere chevrons + soft Cambrian water glow.
// Original neon color constants are preserved exactly.
// ===============================================================

#define fragColor gl_FragColor
uniform float iTime;

#define MAX_STEPS    132
runnable fragment

20260601

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
#define TDOutputSwizzle(c) (c)
// ===============================================================
// ODARAIA NEON FOSSIL
// TouchDesigner GLSL TOP fragment shader
// Bivalved carapace + stalked eyes + segmented trunk + biramous
// limb haze + three-part tail fan, using the original neon palette.
// ===============================================================

#define fragColor gl_FragColor
uniform float iTime;

#define MAX_STEPS 136
#define MAX_DIST  15.0
runnable fragment

20260608

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
#define TDOutputSwizzle(c) (c)
// ===============================================================
// ODARAIA NEON FOSSIL
// TouchDesigner GLSL TOP fragment shader
// Isoxys-inspired shield carapace + cardinal spines + stalked eyes
// + grasping appendages + biramous paddles, using the original neon palette.
// ===============================================================

#define fragColor gl_FragColor
uniform float iTime;

#define MAX_STEPS 136
#define MAX_DIST  15.0