runnable fragment

001GianlucaFirstShader

gianluca-shader-gallery generative glsl runnable fragment MIT
code snippet
precision mediump float;

uniform vec2 iResolution; // viewport resolution (in pixels)
uniform float iTime; // shader playback time (in seconds)
uniform vec2 iMouse; // mouse pixel coords. xy: current (if MLB down), zw: click

vec3 palette(float t) {
    //https://iquilezles.org/articles/palettes/
    vec3 a = vec3(0.1, 0.1, 0.1);
    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);

    return a + b * cos(6.28318 * (c * t + d));
runnable fragment

002GianlucaExperiment

gianluca-shader-gallery generative glsl runnable fragment MIT
code snippet
precision mediump float;

uniform vec2 iResolution; // viewport resolution (in pixels)
uniform float iTime; // shader playback time (in seconds)
uniform vec2 iMouse; // mouse pixel coords. xy: current (if MLB down), zw: click

vec3 palette(float t) {
    //https://iquilezles.org/articles/palettes/
    vec3 a = vec3(0.1, 0.1, 0.1);
    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);

    return a + b * cos(1.28318 * (c * t + d));
runnable fragment

004PunchDrunk

gianluca-shader-gallery generative glsl runnable fragment MIT
code snippet
precision mediump float;

uniform vec2 iResolution;
uniform float iTime;
uniform vec2 iMouse;

void mainImage(out vec4 fragColor, in vec2 fragCoord) {
    vec2 uv = fragCoord / iResolution.xy;

    // Create two fractionings of coordinate space
    vec2 uv1 = fract(uv * 3.);
    vec2 uv2 = fract((uv - 0.5) * 10. * sin(0.5*iTime+.5)*0.5+0.5);

    // Create 1d vertical noise lines
runnable fragment

005ThirtyFRB

gianluca-shader-gallery generative glsl runnable fragment MIT
code snippet
#ifdef GL_FRAGMENT_PRECISION_HIGH
precision highp float;
precision highp int;
#else
precision mediump float;
precision mediump int;
#endif

// Twin-prime midpoints: 4, 6, 12, 18, 30, 42, 60, ...
// We met at 18. Now we're at 30. 
// Happy Birthday, FRB! Here's to (infinitely?) many more!

uniform vec2 iResolution; // viewport resolution (in pixels)
uniform float iTime; // shader playback time (in seconds)
runnable fragment

202401

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

void main()
{
    vec2 uv = (gl_FragCoord.xy - u_resolution / 2.0) / u_resolution.y;
    float len = length(uv);

    // Base colors with smooth transition
    float r = sin(len * 12.0 - u_time * 3.0) * 0.5 + 0.5;
runnable fragment

202402

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

void main()
{
    vec2 uv = (gl_FragCoord.xy - u_resolution / 2.0) / u_resolution.y;

    float len = length(uv);

    // Base colors with smooth transition and reduced intensity
runnable fragment

202403

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

void main()
{
    vec2 uv = (gl_FragCoord.xy - u_resolution / 2.0) / u_resolution.y;
    float len = length(uv);
    float angle = atan(uv.y, uv.x);
    float radius = length(uv);
runnable fragment

202404

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

void main()
{
    vec2 uv = (gl_FragCoord.xy - u_resolution / 2.0) / u_resolution.y;
    float len = length(uv);
    float angle = atan(uv.y, uv.x);
    float radius = length(uv);
runnable fragment

202407

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

#define fragColor gl_FragColor

// Function to create a kaleidoscope effect
vec2 kaleidoscope(vec2 uv, float segments) {
    float angle = atan(uv.y, uv.x);
    float radius = length(uv);
    float newAngle = mod(angle, 2.0 * 3.141592 / segments);
    return vec2(cos(newAngle), sin(newAngle)) * radius;
}
runnable fragment

202408

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

#define fragColor gl_FragColor

void main()
{
    vec2 uv = (gl_FragCoord.xy - 0.5 * resolution.xy) / resolution.y;

    // Dynamic scaling and rotation for the fractal over time
    float scale = 1.5 + 0.5 * sin(time * 0.2);
    float angle = time * 0.1;
    mat2 rotation = mat2(cos(angle), -sin(angle), sin(angle), cos(angle));
runnable fragment

202409

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

#define fragColor gl_FragColor

void main()
{
    // Normalize pixel coordinates (from 0 to 1)
    vec2 uv = gl_FragCoord.xy / resolution;

    // Move coordinates from (0,1) to (-1,1)
    uv = uv * 2.0 - 1.0;
runnable fragment

202410

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

#define fragColor gl_FragColor

void main()
{
    // Normalize pixel coordinates (from 0 to 1)
    vec2 uv = gl_FragCoord.xy / resolution;

    // Move coordinates from (0,1) to (-1,1)
    uv = uv * 2.0 - 1.0;
runnable fragment

202411

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

#define fragColor gl_FragColor

void main() {
    vec2 uv = (gl_FragCoord.xy - 0.5 * resolution.xy) / resolution.y;
    
    float len = length(uv);
    float angle = atan(uv.y, uv.x);

    // Increase number of segments for more intricate patterns
runnable fragment

202412

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
// Enhanced Flower of Life with Multi-Layered Central Light Pulse and Bloom
uniform float time;
uniform vec2 resolution;

#define fragColor gl_FragColor

// Function to draw a glowing circle with soft edges
float drawGlowCircle(vec2 uv, vec2 center, float radius, float glowIntensity) {
    float dist = length(uv - center);
    float glow = exp(-dist * glowIntensity) * smoothstep(radius + 0.01, radius - 0.01, dist);
    return glow;
}
runnable fragment

202413

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
// Refined Flower of Life with Balanced Glow and Aurora Shimmer (No Noise)
uniform float time;
uniform vec2 resolution;

#define fragColor gl_FragColor

// Function to draw a glowing circle with soft edges
float drawGlowCircle(vec2 uv, vec2 center, float radius, float glowIntensity) {
    float dist = length(uv - center);
    float glow = exp(-dist * glowIntensity) * smoothstep(radius + 0.01, radius - 0.01, dist);
    return glow * 0.5;  // Reduce overall glow intensity
}
runnable fragment

202414

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

void main()
{
    vec2 uv = (gl_FragCoord.xy - u_resolution / 2.0) / u_resolution.y;
    float len = length(uv);

    // Base harmonic oscillations for radiant colors
    float baseR = sin(len * 10.0 - u_time * 1.5) * 0.5 + 0.5;
runnable fragment

20250106

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

void main() {
    vec2 uv = (gl_FragCoord.xy - u_resolution / 2.0) / u_resolution.y;
    float len = length(uv);

    // Base radial gradient for depth and cosmic feel
    float radialGradient = smoothstep(0.4, 1.2, len);
runnable fragment

20250122

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
// "Beautiful Flower of Life" in a spiritual, mandala-like style.
// 
// Uniforms expected:
//   - u_time (float): Time in seconds
//   - u_resolution (vec2): The width and height of the viewport
//
// The final color is written to fragColor.

uniform float u_time;
uniform vec2 u_resolution;

#define fragColor gl_FragColor
runnable fragment

20250219

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

#define fragColor gl_FragColor

//--------------------------------------------------
// Utility Functions
//--------------------------------------------------

// Pseudo-random function for noise
float random(vec2 st) {
    return fract(sin(dot(st, vec2(12.9898,78.233))) * 43758.5453123);
}
runnable fragment

20250309

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
// TouchDesigner GLSL TOP - Ultimate Spiritual Sacred Geometry Shader
uniform float u_time;
uniform vec2 u_resolution;

#define fragColor gl_FragColor

// Golden Ratio constant
const float PHI = 1.61803398875;
const float PI = 3.14159265359;

// Function to create a hexagonal grid (Sri Yantra-like Pattern)
vec2 sacredGrid(vec2 p) {
    vec2 q = vec2(p.x * 2.0, p.y * 1.73205);
runnable fragment

20250317

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
// Enhanced Sacred Geometry Shader with Complex, Nested Polygonal Patterns

uniform float u_time;
uniform vec2 u_resolution;

#define fragColor gl_FragColor

// ---------------------------------------------------
// 1) Pseudo-random noise (hash-based)
// ---------------------------------------------------
float hash21(vec2 p)
{
    p = fract(p * vec2(234.34, 435.345));
runnable fragment

20250324

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
// "Immersive Animated Flower of Life" Shader
//
// Uniforms expected:
//   - u_time (float): Time in seconds
//   - u_resolution (vec2): The width and height of the viewport
//
// The final color is written to fragColor.

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

// ---------------------------------------------------
runnable fragment

20250325

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
// "Ethereal Radiant Mandala" Shader
//
// Uniforms expected:
//   - u_time (float): Time in seconds
//   - u_resolution (vec2): The width and height of the viewport
//
// The final color is written to fragColor.

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

#define PI 3.14159265359
runnable fragment

20250415

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
// Sacred Portal Shader – Spiritually Tuned Mandala Cosmos

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

float hash21(vec2 p) {
    p = fract(p * vec2(234.34, 435.345));
    p += dot(p, p + 34.345);
    return fract(p.x * p.y);
}

float noise2D(vec2 p) {
runnable fragment

20250418

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
uniform float u_time;
uniform vec2 u_resolution;
#define fragColor gl_FragColor

#define MAX_STEPS   120
#define MAX_DIST    100.0
#define SURF_DIST   0.001

float opSmoothUnion(float d1, float d2, float k) {
    float h = clamp(0.5 + 0.5 * (d2 - d1) / k, 0.0, 1.0);
    return mix(d2, d1, h) - k * h * (1.0 - h);
}
runnable fragment

20250507

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
uniform float u_time;
uniform vec2 u_resolution;
#define fragColor gl_FragColor

#define MAX_STEPS 150
#define MAX_DIST 100.0
#define SURF_DIST 0.001

// Smooth min for blending shapes
float opSmoothUnion(float d1, float d2, float k) {
    float h = clamp(0.5 + 0.5 * (d2 - d1) / k, 0.0, 1.0);
    return mix(d2, d1, h) - k * h * (1.0 - h);
}
runnable fragment

20250526

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
// 🌸 Elegant Pastel Mandala Shader
uniform float u_time;
uniform vec2  u_resolution;
#define fragColor gl_FragColor

#define TAU 6.28318530718

//---------------------- Elegant Pastel Palette ----------------------
vec3 palette(float t){
    vec3 a = vec3(0.92, 0.90, 0.89);  // elegant ivory tone
    vec3 b = vec3(0.12, 0.13, 0.14);  // low contrast for subtlety
    vec3 c = vec3(1.0);
    vec3 d = vec3(0.03, 0.20, 0.55);
runnable fragment

20250618

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
#define TDOutputSwizzle(c) (c)
// TouchDesigner GLSL TOP (GLSL 3.30)
// “Rose-Nebula💎DIVINE BLOOM” – The peak of sacred spiritual visual geometry

uniform float time;
uniform vec2 resolution;
#define fragColor gl_FragColor

vec3 hsv2rgb(vec3 c){
    vec3 p = abs(fract(c.x + vec3(0.0,2./3.,1./3.))*6.0 - 3.0);
    return c.z * mix(vec3(1.0), clamp(p - 1.0, 0.0, 1.0), c.y);
}
runnable fragment

20250704

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
// 🌊✨ IMMERSIVE Cosmic Ocean - Deep Dive Edition
// Full environmental immersion with parallax depth, atmospheric fog,
// dynamic camera effects, and spatial audio visualization

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

#define TAU 6.28318530718
#define PI 3.14159265359
#define GOLDEN_RATIO 1.61803398875

// Enhanced hash functions
runnable fragment

20250715

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
// 🔺✨ CRYSTALLINE PRISM - Dynamic Geometric Art
// Abstract geometric patterns with prismatic color separation,
// rotating crystal formations, and dynamic lighting effects

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

#define TAU 6.28318530718
#define PI 3.14159265359
#define SQRT3 1.73205080757

// Rotation matrix
runnable fragment

20250718

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
// 🔺🌠 CRYSTALLINE PRISM — ANIMATED COSMIC SPIRIT MODE
// —————————————————————————————————————————————————————————
// Enhanced motion: dynamic swirl, pulsating superformula, flickering stars, evolving kaleidoscope

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

#define TAU 6.2831853
#define PHI 1.6180339

// ----------------------------------------------------------------------------
//  Hash & Noise
runnable fragment

20250801

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
// 🌊✨ IMMERSIVE Cosmic Ocean - Deep Dive Edition
// Full environmental immersion with parallax depth, atmospheric fog,
// dynamic camera effects, and spatial audio visualization

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

#define TAU 6.28318530718
#define PI 3.14159265359
#define GOLDEN_RATIO 1.61803398875

// Enhanced hash functions
runnable fragment

20250813

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
// ✴︎ MONO MANDALA QUASICRYSTAL — v2 (ultra clean B/W) ✴︎

uniform float u_time;
uniform vec2  u_resolution;

#define fragColor gl_FragColor

const float PI  = 3.14159265359;
const float TAU = 6.28318530718;
const float PHI = 1.61803398875;

// ---------- utils
mat2 rotate2D(float a){ float s=sin(a), c=cos(a); return mat2(c,-s,s,c); }
runnable fragment

20250818

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
// 🔺🌠 CRYSTALLINE PRISM — ANIMATED COSMIC SPIRIT MODE
// —————————————————————————————————————————————————————————
// Enhanced motion: dynamic swirl, pulsating superformula, flickering stars, evolving kaleidoscope

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

#define TAU 6.2831853
#define PHI 1.6180339

// ----------------------------------------------------------------------------
//  Hash & Noise
runnable fragment

20250819

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
// ✴︎ MANDALA QUASICRYSTAL — SMOOTH SEGMENT MORPH (no "watch tick")
// Uniforms: u_time (float), u_resolution (vec2), uAudio (optional 0..1)

uniform float u_time;
uniform vec2  u_resolution;
uniform float uAudio; // optional; if not wired, TD gives 0

#define fragColor gl_FragColor

const float PI  = 3.14159265359;
const float TAU = 6.28318530718;

// ---------- Tunables
runnable fragment

20250909

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
// ✨ Mathematical Sacred Mandala Shader - Refactored Version
// A sophisticated black & white mandala featuring:
// - 13+ layers of complex mathematical geometry
// - Sacred patterns with hidden details
// - 3D depth simulation and realistic lighting
// - Advanced mathematical curves and spirals

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

// Mathematical constants
#define TAU 6.28318530718
runnable fragment

20250910

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
#define TDOutputSwizzle(c) (c)
// Crystal Shader with Theme Colors

uniform float u_time;
uniform vec2 u_resolution;

// Theme color palette
const vec3 deepPurple = vec3(0.212, 0.176, 0.471);  // #362d78
const vec3 richPurple = vec3(0.322, 0.247, 0.639);  // #523fa3  
const vec3 lavender = vec3(0.569, 0.424, 0.800);    // #916ccc
const vec3 lightLavender = vec3(0.741, 0.631, 0.898); // #bda1e5
const vec3 paleBlue = vec3(0.784, 0.753, 0.914);    // #c8c0e9
const vec3 skyBlue = vec3(0.518, 0.729, 0.906);     // #84bae7
runnable fragment

20250919

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
// TouchDesigner GLSL TOP - Pixel Shader
// Enhanced raymarch scene with flowing geometries and ethereal lighting

#define fragColor gl_FragColor

uniform float u_time;
uniform vec2  u_resolution;

// ------------------------------
// Enhanced Quality Settings
// ------------------------------
const int   MAX_STEPS  = 64;
const float MAX_DIST   = 120.0;
runnable fragment

20251002

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
// TouchDesigner GLSL TOP - Pixel Shader
// Enhanced raymarch scene with flowing geometries and ethereal lighting

#define fragColor gl_FragColor

uniform float u_time;
uniform vec2  u_resolution;

// ------------------------------
// Enhanced Quality Settings
// ------------------------------
const int   MAX_STEPS  = 64;
const float MAX_DIST   = 120.0;
runnable fragment

20251023

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;

#define fragColor gl_FragColor

uniform float u_time;
uniform vec2  u_resolution;

// TODO(human): Experiment with these parameters to customize the visual
// Try different values: CIRCLES (3-12), LAYERS (2-5), SPEED (0.2-0.8)
#define CIRCLES 7.0
#define LAYERS 4.0
#define SPEED 0.6

// Golden ratio - the sacred proportion
runnable fragment

20251103

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
// TouchDesigner GLSL TOP - Pixel Shader
// Ultra Beautiful 3D Raymarching Scene
// Theme: Ethereal Purple-Blue Cosmic Dreams

#define fragColor gl_FragColor

uniform float u_time;
uniform vec2  u_resolution;

// Your exquisite color palette
const vec3 col1 = vec3(0.212, 0.176, 0.471); // #362d78
const vec3 col2 = vec3(0.322, 0.247, 0.639); // #523fa3
const vec3 col3 = vec3(0.569, 0.424, 0.800); // #916ccc
runnable fragment

20251126

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
#define fragColor gl_FragColor

uniform float u_time;
uniform vec2  u_resolution;

// Color palette - purple and blue theme
const vec3 color1 = vec3(0.212, 0.176, 0.471); // #362d78
const vec3 color2 = vec3(0.322, 0.247, 0.639); // #523fa3
const vec3 color3 = vec3(0.569, 0.424, 0.800); // #916ccc
const vec3 color4 = vec3(0.741, 0.631, 0.898); // #bda1e5
const vec3 color5 = vec3(0.784, 0.753, 0.914); // #c8c0e9
const vec3 color6 = vec3(0.518, 0.729, 0.906); // #84bae7
const vec3 color7 = vec3(0.318, 0.416, 0.831); // #516ad4
runnable fragment

20251208

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
#define fragColor gl_FragColor

uniform float u_time;
uniform vec2  u_resolution;

// Theme color palette - deep purples to teals
const vec3 COL0 = vec3(0.212, 0.176, 0.471); // #362d78
const vec3 COL1 = vec3(0.322, 0.247, 0.639); // #523fa3
const vec3 COL2 = vec3(0.569, 0.424, 0.800); // #916ccc
const vec3 COL3 = vec3(0.741, 0.631, 0.898); // #bda1e5
const vec3 COL4 = vec3(0.784, 0.753, 0.914); // #c8c0e9
const vec3 COL5 = vec3(0.518, 0.729, 0.906); // #84bae7
const vec3 COL6 = vec3(0.318, 0.416, 0.831); // #516ad4
runnable fragment

20251222

glsl-daily-practice generative glsl runnable fragment MIT
code snippet
precision mediump float;
#define fragColor gl_FragColor

uniform float u_time;
uniform vec2  u_resolution;

// Color palette - original cool purples and blues
const vec3 color1 = vec3(0.212, 0.176, 0.471); // deep purple
const vec3 color2 = vec3(0.322, 0.247, 0.639); // royal purple
const vec3 color3 = vec3(0.569, 0.424, 0.800); // lavender
const vec3 color4 = vec3(0.741, 0.631, 0.898); // light purple
const vec3 color5 = vec3(0.784, 0.753, 0.914); // pale lavender
const vec3 color6 = vec3(0.518, 0.729, 0.906); // sky blue
const vec3 color7 = vec3(0.318, 0.416, 0.831); // blue
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