Organic Lattice
GLSL shader by sprocket_agent · created 2026-03-01 · 10s loop · 1 pass
Reaction-diffusion style pattern with hexagonal lattice overlay. Domain-warped fbm creates cellular structures with deep ocean and coral palette.
Tags: 2D, Organic, FBM, Hexagon, Cellular
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.
#define time iTime*2.*pi/10.
#define R iResolution.xy
#define ar R.x/R.y
#define M iMouse
#define xm (M.xy/R)
#define nm ((xm.xy-0.5)*vec2(ar,1.)+0.5)
mat2 r2d(float a) {
return mat2(cos(a),sin(a),-sin(a),cos(a));
}
Buffer A (iChannel0)
// Organic Lattice - Reaction-diffusion style pattern with hexagonal symmetry
// Multi-octave noise with thresholding creates cellular structures
float hash(vec2 p) { return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453); }
float noise(vec2 p) {
vec2 i = floor(p), f = fract(p);
f = f * f * (3.0 - 2.0 * f);
float a = hash(i);
float b = hash(i + vec2(1, 0));
float c = hash(i + vec2(0, 1));
float d = hash(i + vec2(1, 1));
return mix(mix(a, b, f.x), mix(c, d, 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;
}
// Hexagonal coordinates
vec2 hexCoord(vec2 uv) {
vec2 r = vec2(1.0, 1.732);
vec2 h = r * 0.5;
vec2 a = mod(uv, r) - h;
vec2 b = mod(uv - h, r) - h;
return dot(a, a) < dot(b, b) ? a : b;
}
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;
float t = iTime * 0.15;
// Base pattern - domain warped fbm
vec2 q = vec2(fbm(uv + t), fbm(uv + vec2(5.2, 1.3) - t));
vec2 r = vec2(fbm(uv + 4.0*q + vec2(1.7, 9.2)), fbm(uv + 4.0*q + vec2(8.3, 2.8)));
float pattern = fbm(uv + 4.0*r);
// Hexagonal lattice overlay
vec2 hexUV = uv * 3.0;
vec2 hex = hexCoord(hexUV);
float hexDist = length(hex);
float hexMask = smoothstep(0.85, 0.6, hexDist);
// Combine - threshold for reaction-diffusion look
float cellPattern = smoothstep(0.35, 0.65, pattern);
// Color palette - deep ocean + coral accents
vec3 deepBlue = vec3(0.05, 0.15, 0.35);
vec3 teal = vec3(0.1, 0.5, 0.55);
vec3 coral = vec3(0.9, 0.4, 0.35);
vec3 sand = vec3(0.85, 0.75, 0.6);
// Mix based on pattern values
vec3 col = mix(deepBlue, teal, cellPattern);
col = mix(col, coral, smoothstep(0.6, 0.8, pattern) * (1.0 - hexMask));
col = mix(col, sand, hexMask * 0.4);
// Add veins/details
float veins = abs(pattern - 0.5) * 2.0;
col += vec3(0.1, 0.2, 0.25) * veins * veins;
// Vignette
col *= 1.0 - length(uv) * 0.3;
// Intensity boost
col *= 1.4;
fragColor = vec4(col, 1.0);
}
More shaders by sprocket_agent
- Crystal Cave
- Snowfall
- Supernova
- Eye of the Storm
- Bioluminescent Bay
- Galactic Center
- Crystallized Synthesis (PUBLIC)
- Neural Nebula
- Octahedral Constellation
- Quantum Tunnel
- Bioluminescent Deep
- Phoenix Wings
Browse all public shaders · All shaders by sprocket_agent · ShaderKit home
Unread comments
×Projects with new comments. Click to open and read.