runnable fragment

Aurora Veil

stronghold-curated generative glsl runnable fragment MIT
code snippet
precision mediump float;
uniform vec2 resolution;
uniform float time;
float hash(vec2 p){ return fract(sin(dot(p, vec2(127.1,311.7))) * 43758.5453123); }
float noise(vec2 p){ vec2 i=floor(p), f=fract(p); f=f*f*(3.0-2.0*f); return mix(mix(hash(i),hash(i+vec2(1.0,0.0)),f.x),mix(hash(i+vec2(0.0,1.0)),hash(i+vec2(1.0,1.0)),f.x),f.y); }
float fbm(vec2 p){ float v=0.0,a=0.5; for(int i=0;i<5;i++){ v+=a*noise(p); p*=2.0; a*=0.5; } return v; }
void main(){
  vec2 uv=gl_FragCoord.xy/resolution.xy;
  float band=0.0;
  for(int i=0;i<4;i++){
    float fi=float(i);
    float y=0.34+0.12*sin(uv.x*5.0+time*(0.35+fi*0.08)+fi);
    float n=fbm(vec2(uv.x*3.0+time*0.06, uv.y*2.0+fi));
    band += smoothstep(0.25,0.0,abs(uv.y-y-n*0.18))*0.35;
runnable fragment

Brushed Metal Anisotropy

stronghold-curated material glsl runnable fragment MIT
code snippet
precision mediump float;
uniform vec2 resolution;
uniform float time;
float hash(float n){return fract(sin(n)*43758.5453);} 
void main(){
 vec2 uv=gl_FragCoord.xy/resolution.xy;
 float row=floor(uv.y*520.0);
 float streak=hash(row)*0.18+hash(row+17.0)*0.08;
 float wave=0.08*sin(uv.x*46.0+hash(row)*6.283)+0.05*sin(uv.x*113.0+time*0.15);
 float shine=pow(max(0.0,1.0-abs(uv.y-0.48-wave)*3.2),3.0);
 vec3 base=mix(vec3(0.18,0.19,0.2),vec3(0.72,0.74,0.76),uv.x*0.35+0.35+streak);
 gl_FragColor=vec4(base+shine*vec3(0.42,0.5,0.58),1.0);
}
runnable fragment

Cellular Slime Mold

stronghold-curated generative glsl runnable fragment MIT
code snippet
precision mediump float;
uniform vec2 resolution;
uniform float time;
float hash(vec2 p){return fract(sin(dot(p,vec2(127.1,311.7)))*43758.5453);} 
void main(){
 vec2 uv=gl_FragCoord.xy/resolution.xy; uv.x*=resolution.x/resolution.y; vec2 g=uv*11.0,id=floor(g),f=fract(g); float acc=0.0;
 for(int y=-1;y<=1;y++)for(int x=-1;x<=1;x++){vec2 o=vec2(float(x),float(y));float r=hash(id+o);vec2 c=o+0.5+0.35*vec2(sin(time*.5+r*6.28),cos(time*.4+r*9.1))-f;float d=length(c);acc+=0.018/(0.012+d*d);} 
 float vein=smoothstep(0.55,1.2,acc); vec3 col=mix(vec3(0.015,0.025,0.012),vec3(0.55,0.95,0.18),vein); col+=pow(acc,2.0)*0.03; gl_FragColor=vec4(col,1.0);
}
runnable fragment

Crystal Lattice Refraction

stronghold-curated material glsl runnable fragment MIT
code snippet
precision mediump float;
uniform vec2 resolution;
uniform float time;
vec2 hash(vec2 p){p=vec2(dot(p,vec2(127.1,311.7)),dot(p,vec2(269.5,183.3)));return fract(sin(p)*43758.5453);} 
void main(){
 vec2 uv=gl_FragCoord.xy/resolution.xy; uv.x*=resolution.x/resolution.y;
 vec2 g=uv*6.0; vec2 id=floor(g); vec2 f=fract(g);
 float d=9.0; vec2 nearest=vec2(0.0);
 for(int y=-1;y<=1;y++)for(int x=-1;x<=1;x++){vec2 o=vec2(float(x),float(y));vec2 r=hash(id+o);float nd=length(o+r-f);if(nd<d){d=nd;nearest=r;}}
 float facet=smoothstep(0.0,0.9,d);
 vec3 col=0.45+0.45*cos(vec3(0.0,2.2,4.1)+facet*6.0+nearest.x*3.0+time*0.15);
 gl_FragColor=vec4(col*(1.0-d*0.55)+0.18,1.0);
}
runnable fragment

Cyber Circuit Traces

stronghold-curated pattern glsl runnable fragment MIT
code snippet
precision mediump float;
uniform vec2 resolution;
uniform float time;
float hash(vec2 p){return fract(sin(dot(p,vec2(17.0,59.4)))*43758.5453);} 
void main(){
 vec2 uv=gl_FragCoord.xy/resolution.xy; uv.x*=resolution.x/resolution.y;
 vec2 g=uv*12.0; vec2 id=floor(g); vec2 f=fract(g);
 float rnd=hash(id);
 float h=smoothstep(0.47,0.49,abs(f.y-0.5))*smoothstep(0.51,0.49,abs(f.y-0.5));
 float v=smoothstep(0.47,0.49,abs(f.x-0.5))*smoothstep(0.51,0.49,abs(f.x-0.5));
 float active=step(0.45, sin(rnd*6.283+time*1.5));
 float pads=smoothstep(0.18,0.0,length(f-0.5))*step(0.72,rnd);
 float glow=(h*step(0.35,rnd)+v*step(rnd,0.65)+pads)*active;
 gl_FragColor=vec4(vec3(0.01,0.025,0.04)+glow*vec3(0.0,0.95,0.75),1.0);
runnable fragment

Dune Height Lines

stronghold-curated material glsl runnable fragment MIT
code snippet
precision mediump float;
uniform vec2 resolution;
uniform float time;
float hash(vec2 p){return fract(sin(dot(p,vec2(13.1,117.7)))*43758.5453);} float noise(vec2 p){vec2 i=floor(p),f=fract(p);f=f*f*(3.0-2.0*f);return mix(mix(hash(i),hash(i+vec2(1,0)),f.x),mix(hash(i+vec2(0,1)),hash(i+1.0),f.x),f.y);} 
float fbm(vec2 p){float v=0.0,a=.5;for(int i=0;i<5;i++){v+=a*noise(p);p*=2.;a*=.5;}return v;}
void main(){
 vec2 uv=gl_FragCoord.xy/resolution.xy; uv.x*=resolution.x/resolution.y; float h=fbm(uv*4.0+vec2(time*.015,0)); float ridges=sin((uv.x*2.5+h*1.4)*28.0); float crest=smoothstep(.65,1.0,ridges); vec3 sand=mix(vec3(.45,.28,.11),vec3(.95,.72,.38),h); gl_FragColor=vec4(sand+crest*.16,1.0);
}
runnable fragment

Electric Voronoi Cells

stronghold-curated pattern glsl runnable fragment MIT
code snippet
precision mediump float;
uniform vec2 resolution;
uniform float time;
vec2 hash(vec2 p) { p = vec2(dot(p, vec2(127.1,311.7)), dot(p, vec2(269.5,183.3))); return fract(sin(p) * 43758.5453); }
void main() {
  vec2 uv = gl_FragCoord.xy / resolution.xy;
  uv.x *= resolution.x / resolution.y;
  vec2 g = uv * 7.0;
  vec2 id = floor(g);
  vec2 f = fract(g);
  float d1 = 9.0;
  float d2 = 9.0;
  for (int y=-1; y<=1; y++) for (int x=-1; x<=1; x++) {
    vec2 o = vec2(float(x), float(y));
runnable fragment

Glitch Scanline Bloom

stronghold-curated generative glsl runnable fragment MIT
code snippet
precision mediump float;
uniform vec2 resolution;
uniform float time;
float hash(float n){return fract(sin(n)*43758.5453);} 
void main(){
 vec2 uv=gl_FragCoord.xy/resolution.xy;
 float row=floor(uv.y*90.0);
 float shift=(hash(row+floor(time*12.0))*2.0-1.0)*0.035*step(0.86,hash(row));
 vec2 p=uv+vec2(shift,0.0);
 float bars=sin(p.x*24.0+time*2.0)+sin(p.y*19.0-time*1.5);
 float scan=0.72+0.28*sin(uv.y*resolution.y*3.14159);
 vec3 col=0.5+0.5*cos(bars+vec3(0.0,2.0,4.0)+time);
 float mask=smoothstep(0.65,1.0,abs(sin(p.x*8.0))*abs(cos(p.y*7.0)));
 gl_FragColor=vec4(col*mask*scan,1.0);
runnable fragment

Holographic Grid Tunnel

stronghold-curated generative glsl runnable fragment MIT
code snippet
precision mediump float;
uniform vec2 resolution;
uniform float time;
void main(){
 vec2 uv=(gl_FragCoord.xy*2.0-resolution.xy)/min(resolution.x,resolution.y);
 float z=1.0/(abs(uv.y)+0.18);
 float x=uv.x*z;
 float y=z+time*1.2;
 float gx=1.0-smoothstep(0.0,0.035,abs(fract(x)-0.5));
 float gy=1.0-smoothstep(0.0,0.035,abs(fract(y)-0.5));
 float horizon=smoothstep(0.0,0.7,z/8.0);
 vec3 col=vec3(0.0,0.02,0.06)+(gx+gy)*horizon*vec3(0.1,0.85,1.0);
 col+=pow(max(0.0,1.0-length(uv)),3.0)*vec3(0.6,0.1,1.0);
 gl_FragColor=vec4(col,1.0);
runnable fragment

Ink Diffusion Bloom

stronghold-curated generative glsl runnable fragment MIT
code snippet
precision mediump float;
uniform vec2 resolution;
uniform float time;
float hash(vec2 p){return fract(sin(dot(p,vec2(77.7,33.3)))*43758.5453);} 
float noise(vec2 p){vec2 i=floor(p),f=fract(p);f=f*f*(3.0-2.0*f);return mix(mix(hash(i),hash(i+vec2(1,0)),f.x),mix(hash(i+vec2(0,1)),hash(i+1.0),f.x),f.y);} 
float fbm(vec2 p){float v=0.0,a=0.5;for(int i=0;i<6;i++){v+=a*noise(p);p*=2.02;a*=0.52;}return v;}
void main(){
 vec2 uv=(gl_FragCoord.xy-0.5*resolution.xy)/min(resolution.x,resolution.y);
 float n=fbm(uv*3.0+vec2(time*0.04,-time*0.03));
 float rings=sin((length(uv)+n*0.28-time*0.04)*32.0);
 float ink=smoothstep(0.2,0.95,n+0.25*rings);
 vec3 paper=vec3(0.92,0.86,0.74);
 vec3 dye=mix(vec3(0.05,0.03,0.12),vec3(0.35,0.03,0.24),n);
 gl_FragColor=vec4(mix(paper,dye,ink),1.0);
runnable fragment

Iridescent Oil Slick

stronghold-curated material glsl runnable fragment MIT
code snippet
precision mediump float;
uniform vec2 resolution;
uniform float time;
float hash(vec2 p){return fract(sin(dot(p,vec2(12.989,78.233)))*43758.5453);} 
float noise(vec2 p){vec2 i=floor(p),f=fract(p);f=f*f*(3.0-2.0*f);return mix(mix(hash(i),hash(i+vec2(1,0)),f.x),mix(hash(i+vec2(0,1)),hash(i+1.0),f.x),f.y);} 
void main(){
 vec2 uv=gl_FragCoord.xy/resolution.xy; uv.x*=resolution.x/resolution.y;
 float n=noise(uv*5.0+time*0.05)+0.5*noise(uv*13.0-time*0.04);
 float phase=n*8.0+uv.x*4.0-uv.y*3.0+time*0.15;
 vec3 rainbow=0.5+0.5*cos(phase+vec3(0.0,2.09,4.18));
 float sheen=smoothstep(0.2,1.0,n);
 gl_FragColor=vec4(mix(vec3(0.015,0.012,0.018), rainbow, sheen),1.0);
}
runnable fragment

Kaleidoscope Prism

stronghold-curated generative glsl runnable fragment MIT
code snippet
precision mediump float;
uniform vec2 resolution;
uniform float time;
void main(){
  vec2 uv=(gl_FragCoord.xy*2.0-resolution.xy)/min(resolution.x,resolution.y);
  float a=atan(uv.y,uv.x);
  float r=length(uv);
  float seg=3.14159/6.0;
  a=abs(mod(a+time*0.12,seg*2.0)-seg);
  vec2 p=vec2(cos(a),sin(a))*r;
  float v=sin(18.0*p.x+time)+sin(16.0*p.y-time*1.3)+sin(12.0*(p.x+p.y)+time*0.7);
  vec3 col=0.55+0.45*cos(vec3(0.0,2.1,4.2)+v+r*8.0+time*0.2);
  gl_FragColor=vec4(col*(1.0-smoothstep(0.85,1.25,r)),1.0);
}
runnable fragment

Lava Lamp Cells

stronghold-curated plasma glsl runnable fragment MIT
code snippet
precision mediump float;
uniform vec2 resolution;
uniform float time;
void main(){
  vec2 uv=(gl_FragCoord.xy*2.0-resolution.xy)/min(resolution.x,resolution.y);
  float field=0.0;
  for(int i=0;i<7;i++){
    float fi=float(i);
    vec2 c=vec2(sin(time*(0.25+fi*0.04)+fi*1.8), cos(time*(0.31+fi*0.03)+fi*2.4))*0.62;
    field += (0.05+0.015*sin(time+fi))/max(0.015, dot(uv-c,uv-c));
  }
  float lava=smoothstep(0.8,2.2,field);
  vec3 col=mix(vec3(0.04,0.0,0.02), vec3(1.0,0.18,0.02), lava);
  col += vec3(1.0,0.75,0.12)*smoothstep(2.6,5.0,field);
runnable fragment

Liquid Marble Material

stronghold-curated material glsl runnable fragment MIT
code snippet
precision mediump float;
uniform vec2 resolution;
uniform float time;
float hash(vec2 p){ return fract(sin(dot(p, vec2(41.0, 289.0))) * 45758.5453); }
float noise(vec2 p){ vec2 i=floor(p), f=fract(p); f=f*f*(3.0-2.0*f); return mix(mix(hash(i),hash(i+vec2(1,0)),f.x),mix(hash(i+vec2(0,1)),hash(i+1.0),f.x),f.y); }
float fbm(vec2 p){ float v=0.0; float a=0.5; for(int i=0;i<5;i++){ v += a*noise(p); p*=2.05; a*=0.5; } return v; }
void main(){
  vec2 uv = gl_FragCoord.xy / resolution.xy;
  uv.x *= resolution.x / resolution.y;
  float n = fbm(uv * 3.0 + vec2(time * 0.035, -time * 0.02));
  float veins = sin((uv.x + n * 1.8) * 22.0);
  float line = smoothstep(0.72, 1.0, veins);
  vec3 stone = mix(vec3(0.08,0.09,0.11), vec3(0.78,0.82,0.86), n);
  vec3 vein = mix(vec3(0.02,0.025,0.035), vec3(0.9,0.75,0.55), line);
runnable fragment

Moire Pulse Rings

stronghold-curated generative glsl runnable fragment MIT
code snippet
precision mediump float;
uniform vec2 resolution;
uniform float time;
void main() {
  vec2 uv = (gl_FragCoord.xy - 0.5 * resolution.xy) / min(resolution.x, resolution.y);
  vec2 a = uv + 0.18 * vec2(sin(time * 0.5), cos(time * 0.4));
  vec2 b = uv - 0.16 * vec2(cos(time * 0.35), sin(time * 0.55));
  float r1 = sin(length(a) * 72.0 - time * 3.0);
  float r2 = sin(length(b) * 69.0 + time * 2.4);
  float m = smoothstep(0.0, 0.08, abs(r1 - r2));
  vec3 color = mix(vec3(0.98,0.2,0.55), vec3(0.1,0.9,1.0), m);
  color *= 0.55 + 0.45 * sin(length(uv) * 8.0 - time);
  gl_FragColor = vec4(color, 1.0);
}
runnable fragment

Nebula Dust Cloud

stronghold-curated generative glsl runnable fragment MIT
code snippet
precision mediump float;
uniform vec2 resolution;
uniform float time;
float hash(vec2 p){return fract(sin(dot(p,vec2(31.7,91.1)))*43758.5453);} 
float noise(vec2 p){vec2 i=floor(p),f=fract(p);f=f*f*(3.0-2.0*f);return mix(mix(hash(i),hash(i+vec2(1,0)),f.x),mix(hash(i+vec2(0,1)),hash(i+1.0),f.x),f.y);} 
float fbm(vec2 p){float v=0.0,a=0.5;for(int i=0;i<6;i++){v+=a*noise(p);p*=2.03+0.05*sin(time);a*=0.52;}return v;}
void main(){
 vec2 uv=(gl_FragCoord.xy-0.5*resolution.xy)/min(resolution.x,resolution.y);
 float n=fbm(uv*2.2+vec2(time*0.025,-time*0.015));
 float d=smoothstep(0.78,0.2,length(uv));
 vec3 col=mix(vec3(0.03,0.02,0.08), vec3(0.85,0.18,0.65), n);
 col=mix(col, vec3(0.12,0.55,1.0), smoothstep(0.45,0.85,fbm(uv*4.0-time*0.02)));
 gl_FragColor=vec4(col*n*d,1.0);
}
runnable fragment

Neon Wave Weave

stronghold-curated pattern glsl runnable fragment MIT
code snippet
precision mediump float;
uniform vec2 resolution;
uniform float time;
void main(){
 vec2 uv=gl_FragCoord.xy/resolution.xy; uv.x*=resolution.x/resolution.y;
 float a=sin((uv.x*18.0 + sin(uv.y*9.0+time)*2.0) - time*1.4);
 float b=sin((uv.y*22.0 + cos(uv.x*8.0-time)*2.0) + time*1.1);
 float lines=smoothstep(0.82,1.0,abs(a))*0.7 + smoothstep(0.86,1.0,abs(b))*0.7;
 vec3 bg=vec3(0.015,0.02,0.07);
 vec3 c=mix(vec3(1.0,0.12,0.6), vec3(0.1,0.9,1.0), step(a,b));
 gl_FragColor=vec4(bg + c*lines,1.0);
}
runnable fragment

Ocean Caustic Mesh

stronghold-curated material glsl runnable fragment MIT
code snippet
precision mediump float;
uniform vec2 resolution;
uniform float time;
void main(){
  vec2 uv=gl_FragCoord.xy/resolution.xy; uv.x*=resolution.x/resolution.y;
  float c=0.0;
  for(int i=0;i<5;i++){
    float fi=float(i)+1.0;
    vec2 p=uv*fi*2.4 + vec2(sin(time*0.25*fi), cos(time*0.18*fi));
    c += abs(sin(p.x*3.14159 + sin(p.y*2.2+time))) / fi;
    c += abs(sin(p.y*3.14159 + cos(p.x*2.0-time*0.7))) / fi;
  }
  c=pow(1.0-smoothstep(0.8,1.45,c/2.4),3.0);
  vec3 water=vec3(0.0,0.18,0.28)+vec3(0.02,0.28,0.38)*uv.y;
runnable fragment

Op Art Checker Warp

stronghold-curated pattern glsl runnable fragment MIT
code snippet
precision mediump float;
uniform vec2 resolution;
uniform float time;
void main(){
 vec2 uv=(gl_FragCoord.xy*2.0-resolution.xy)/min(resolution.x,resolution.y);
 float r=length(uv); float a=atan(uv.y,uv.x);
 vec2 p=uv + 0.18*sin(vec2(uv.y,uv.x)*8.0+time) + 0.08*vec2(cos(a*6.0+time),sin(a*5.0-time));
 float c=mod(floor(p.x*9.0)+floor(p.y*9.0),2.0);
 float rings=0.5+0.5*sin(r*28.0-time*1.2);
 vec3 col=mix(vec3(0.02),vec3(0.96),c); col=mix(col,col.bgr,rings*.35);
 gl_FragColor=vec4(col,1.0);
}
runnable fragment

Plasma Bloom Field

stronghold-curated plasma glsl runnable fragment MIT
code snippet
precision mediump float;
uniform vec2 resolution;
uniform float time;
void main() {
  vec2 uv = (gl_FragCoord.xy * 2.0 - resolution.xy) / min(resolution.x, resolution.y);
  float v = 0.0;
  v += sin(uv.x * 4.0 + time * 1.2);
  v += sin((uv.y * 5.0 + time * 0.9));
  v += sin((uv.x + uv.y) * 3.0 + time * 1.7);
  v += sin(length(uv + vec2(sin(time * 0.4), cos(time * 0.3))) * 8.0 - time * 2.0);
  v = v * 0.25 + 0.5;
  vec3 color = 0.5 + 0.5 * cos(6.28318 * (vec3(0.00, 0.22, 0.45) + v + time * 0.035));
  gl_FragColor = vec4(color, 1.0);
}
runnable fragment

Polar Flower Mandala

stronghold-curated generative glsl runnable fragment MIT
code snippet
precision mediump float;
uniform vec2 resolution;
uniform float time;
void main(){
 vec2 uv=(gl_FragCoord.xy*2.0-resolution.xy)/min(resolution.x,resolution.y); float r=length(uv), a=atan(uv.y,uv.x);
 float petals=sin(a*10.0+time*0.6)*0.18+sin(a*17.0-time*.35)*0.08;
 float shape=smoothstep(0.018,0.0,abs(r-(0.38+petals+0.06*sin(r*24.0-time))));
 float fill=smoothstep(0.72+petals,0.08,r);
 vec3 col=0.5+0.5*cos(vec3(0.0,2.1,4.2)+a*3.0+r*9.0+time*.2);
 gl_FragColor=vec4((shape+fill*.55)*col,1.0);
}
runnable fragment

Procedural Brick Weathering

stronghold-curated material glsl runnable fragment MIT
code snippet
precision mediump float;
uniform vec2 resolution;
uniform float time;
float hash(vec2 p){return fract(sin(dot(p,vec2(91.7,45.3)))*43758.5453);} 
float noise(vec2 p){vec2 i=floor(p),f=fract(p);f=f*f*(3.0-2.0*f);return mix(mix(hash(i),hash(i+vec2(1,0)),f.x),mix(hash(i+vec2(0,1)),hash(i+1.0),f.x),f.y);} 
void main(){
 vec2 uv=gl_FragCoord.xy/resolution.xy; uv.x*=resolution.x/resolution.y; vec2 p=uv*vec2(8.0,5.0); p.x+=mod(floor(p.y),2.0)*0.5; vec2 f=fract(p); vec2 id=floor(p);
 float mortar=step(f.x,0.06)+step(0.94,f.x)+step(f.y,0.08)+step(0.92,f.y); float n=noise(uv*28.0)+0.5*noise(uv*71.0); vec3 brick=mix(vec3(0.32,0.08,0.035),vec3(0.72,0.24,0.12),hash(id)*0.6+n*0.25); vec3 col=mix(brick,vec3(0.48,0.43,0.36),clamp(mortar,0.0,1.0)); gl_FragColor=vec4(col,1.0);
}
runnable fragment

Procedural Starfield Drift

stronghold-curated generative glsl runnable fragment MIT
code snippet
precision mediump float;
uniform vec2 resolution;
uniform float time;
float hash(vec2 p){ return fract(sin(dot(p, vec2(127.1,311.7))) * 43758.5453); }
void main(){
 vec2 uv=(gl_FragCoord.xy-0.5*resolution.xy)/min(resolution.x,resolution.y);
 vec3 col=vec3(0.0);
 for(int layer=0; layer<4; layer++){
   float z=float(layer)+1.0;
   vec2 p=uv*z + vec2(0.0,time*(0.08+0.03*z));
   vec2 id=floor(p*18.0); vec2 f=fract(p*18.0)-0.5;
   float rnd=hash(id+z);
   float star=smoothstep(0.045*rnd,0.0,length(f));
   col += star * mix(vec3(0.45,0.7,1.0), vec3(1.0,0.85,0.55), rnd) / z;
runnable fragment

Raymarched Orb Field

stronghold-curated sdf glsl runnable fragment MIT
code snippet
precision mediump float;
uniform vec2 resolution;
uniform float time;
float map(vec3 p){float d=length(p)-0.45; for(int i=0;i<4;i++){float fi=float(i); vec3 c=vec3(sin(time*.4+fi)*1.1,cos(time*.3+fi*1.7)*.55,fi*.55-1.0); d=min(d,length(p-c)-.22);} return d;}
vec3 normal(vec3 p){vec2 e=vec2(.01,0);return normalize(vec3(map(p+e.xyy)-map(p-e.xyy),map(p+e.yxy)-map(p-e.yxy),map(p+e.yyx)-map(p-e.yyx)));}
void main(){
 vec2 uv=(gl_FragCoord.xy*2.0-resolution.xy)/min(resolution.x,resolution.y); vec3 ro=vec3(0,0,3.0), rd=normalize(vec3(uv,-1.8)); float t=0.0, glow=0.0;
 for(int i=0;i<48;i++){vec3 p=ro+rd*t; float d=map(p); glow+=0.015/(0.02+abs(d)); if(d<.005||t>6.0)break; t+=d*.65;}
 vec3 col=vec3(0.01,0.015,0.04)+glow*vec3(0.12,0.35,0.9); if(t<6.0){vec3 n=normal(ro+rd*t); col+=max(dot(n,normalize(vec3(.4,.7,.5))),0.0)*vec3(.8,.9,1.0);} gl_FragColor=vec4(col,1.0);
}
runnable fragment

Reaction Rings Approximation

stronghold-curated generative glsl runnable fragment MIT
code snippet
precision mediump float;
uniform vec2 resolution;
uniform float time;
float hash(vec2 p){return fract(sin(dot(p,vec2(41.0,289.0)))*45758.5453);} 
float noise(vec2 p){vec2 i=floor(p),f=fract(p);f=f*f*(3.0-2.0*f);return mix(mix(hash(i),hash(i+vec2(1,0)),f.x),mix(hash(i+vec2(0,1)),hash(i+1.0),f.x),f.y);} 
float fbm(vec2 p){float v=0.0,a=0.55;for(int i=0;i<5;i++){v+=a*noise(p);p*=2.05;a*=0.52;}return v;}
void main(){
 vec2 uv=(gl_FragCoord.xy-0.5*resolution.xy)/min(resolution.x,resolution.y);
 float n=fbm(uv*3.4+vec2(time*0.035,-time*0.025));
 float v=sin((length(uv)+n*0.42)*48.0-time*1.2);
 float cells=smoothstep(0.18,0.82,v)*smoothstep(1.05,0.35,n);
 vec3 a=vec3(0.02,0.03,0.055), b=vec3(0.96,0.76,0.28), c=vec3(0.2,0.75,0.72);
 gl_FragColor=vec4(mix(a,mix(b,c,n),cells),1.0);
}
runnable fragment

SDF Soft Blobs

stronghold-curated sdf glsl runnable fragment MIT
code snippet
precision mediump float;
uniform vec2 resolution;
uniform float time;
float circle(vec2 p, vec2 c, float r){ return length(p-c)-r; }
void main(){
 vec2 uv=(gl_FragCoord.xy*2.0-resolution.xy)/min(resolution.x,resolution.y);
 float d=10.0;
 for(int i=0;i<6;i++){
   float fi=float(i);
   vec2 c=0.48*vec2(sin(time*(0.4+fi*0.07)+fi*1.7), cos(time*(0.35+fi*0.05)+fi*2.1));
   d=min(d, circle(uv,c,0.22+0.04*sin(time+fi)));
 }
 float fill=smoothstep(0.035,-0.025,d);
 float glow=0.018/max(0.018,abs(d));
runnable fragment

Solar Flare Surface

stronghold-curated material glsl runnable fragment MIT
code snippet
precision mediump float;
uniform vec2 resolution;
uniform float time;
float hash(vec2 p){return fract(sin(dot(p,vec2(19.19,73.17)))*43758.5453);} 
float noise(vec2 p){vec2 i=floor(p),f=fract(p);f=f*f*(3.0-2.0*f);return mix(mix(hash(i),hash(i+vec2(1,0)),f.x),mix(hash(i+vec2(0,1)),hash(i+1.0),f.x),f.y);} 
float fbm(vec2 p){float v=0.0,a=0.5;for(int i=0;i<5;i++){v+=a*noise(p);p*=2.1;a*=0.5;}return v;}
void main(){
 vec2 uv=(gl_FragCoord.xy*2.0-resolution.xy)/min(resolution.x,resolution.y);
 float r=length(uv);
 float n=fbm(uv*4.0+time*0.22);
 float disk=smoothstep(0.72,0.66,r+n*0.05);
 float flare=pow(max(0.0,1.0-r),2.0)*0.7;
 vec3 col=mix(vec3(0.1,0.0,0.0), vec3(1.0,0.25,0.02), disk);
 col+=vec3(1.0,0.75,0.18)*(n*disk+flare);
runnable fragment

Stained Glass Mosaic

stronghold-curated pattern glsl runnable fragment MIT
code snippet
precision mediump float;
uniform vec2 resolution;
uniform float time;
vec2 hash(vec2 p){p=vec2(dot(p,vec2(127.1,311.7)),dot(p,vec2(269.5,183.3)));return fract(sin(p)*43758.5453);} 
void main(){
 vec2 uv=gl_FragCoord.xy/resolution.xy; uv.x*=resolution.x/resolution.y;
 vec2 g=uv*8.0,id=floor(g),f=fract(g); float d=9.0; vec2 cell=vec2(0.0);
 for(int y=-1;y<=1;y++)for(int x=-1;x<=1;x++){vec2 o=vec2(float(x),float(y));vec2 r=hash(id+o);float nd=length(o+r-f);if(nd<d){d=nd;cell=id+o;}}
 float lead=smoothstep(0.06,0.025,d);
 vec3 glass=0.5+0.5*cos(vec3(0.0,2.2,4.4)+hash(cell).x*6.283+time*0.05);
 gl_FragColor=vec4(mix(glass*0.85,vec3(0.02),lead),1.0);
}
runnable fragment

Topographic Contour Terrain

stronghold-curated pattern glsl runnable fragment MIT
code snippet
precision mediump float;
uniform vec2 resolution;
uniform float time;
float hash(vec2 p){return fract(sin(dot(p,vec2(113.5,271.9)))*43758.5453);} 
float noise(vec2 p){vec2 i=floor(p),f=fract(p);f=f*f*(3.0-2.0*f);return mix(mix(hash(i),hash(i+vec2(1,0)),f.x),mix(hash(i+vec2(0,1)),hash(i+1.0),f.x),f.y);} 
float fbm(vec2 p){float v=0.0,a=0.5;for(int i=0;i<5;i++){v+=a*noise(p);p*=2.0;a*=0.5;}return v;}
void main(){
 vec2 uv=gl_FragCoord.xy/resolution.xy; uv.x*=resolution.x/resolution.y;
 float h=fbm(uv*4.0+0.05*sin(time));
 float lines=1.0-smoothstep(0.0,0.035,abs(fract(h*12.0)-0.5));
 vec3 land=mix(vec3(0.05,0.13,0.08),vec3(0.72,0.55,0.28),h);
 gl_FragColor=vec4(land+lines*vec3(0.9,0.85,0.55),1.0);
}
runnable fragment

Velvet Fiber Sheen

stronghold-curated material glsl runnable fragment MIT
code snippet
precision mediump float;
uniform vec2 resolution;
uniform float time;
float hash(vec2 p){return fract(sin(dot(p,vec2(27.1,61.7)))*43758.5453);} 
void main(){
 vec2 uv=gl_FragCoord.xy/resolution.xy;
 float fibers=0.0;
 for(int i=0;i<4;i++){float fi=float(i); vec2 p=uv*vec2(30.0+fi*12.0,180.0); float r=hash(floor(p)+fi); fibers+=smoothstep(0.985,1.0,sin((uv.x*45.0+uv.y*9.0+fi)*3.14159+r*6.283));}
 float nap=pow(max(0.0,1.0-distance(uv,vec2(0.5+0.15*sin(time*.2),0.45))*1.7),2.0);
 vec3 col=mix(vec3(0.08,0.01,0.07),vec3(0.55,0.08,0.38),nap)+fibers*0.035;
 gl_FragColor=vec4(col,1.0);
}
runnable fragment

Wood Grain Material

stronghold-curated material glsl runnable fragment MIT
code snippet
precision mediump float;
uniform vec2 resolution;
uniform float time;
float hash(vec2 p){ return fract(sin(dot(p, vec2(13.13, 117.17))) * 43758.5453); }
float noise(vec2 p){ vec2 i=floor(p), f=fract(p); f=f*f*(3.0-2.0*f); return mix(mix(hash(i),hash(i+vec2(1,0)),f.x),mix(hash(i+vec2(0,1)),hash(i+1.0),f.x),f.y); }
void main(){
 vec2 uv = gl_FragCoord.xy / resolution.xy; uv.x *= resolution.x/resolution.y;
 float n = noise(uv*9.0) + 0.5*noise(uv*22.0);
 float rings = sin((uv.x + n*0.09 + 0.02*sin(uv.y*18.0)) * 55.0);
 float grain = smoothstep(-0.2, 1.0, rings);
 vec3 dark = vec3(0.22,0.10,0.035), light = vec3(0.72,0.38,0.13);
 gl_FragColor = vec4(mix(dark, light, grain) * (0.75 + 0.25*n), 1.0);
}