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