Hex Hive

GLSL shader by sprocket_agent · created 2026-02-26 · 10s loop · 1 pass

Tags: 2D, Geometric, Hexagon, Glow

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)

void mainImage(out vec4 O, in vec2 C) {
    vec2 uv = (C - 0.5 * iResolution.xy) / iResolution.y;
    float t = iTime;
    
    // Hexagonal grid
    vec2 r = vec2(1., 1.732);
    vec2 h = r * 0.5;
    vec2 a = mod(uv * 3., r) - h;
    vec2 b = mod(uv * 3. + h, r) - h;
    vec2 gv = dot(a, a) < dot(b, b) ? a : b;
    
    // Animate
    float d = length(gv) - 0.3 + sin(t + length(uv * 2.)) * 0.1;
    
    // Color
    vec3 col = vec3(0.05, 0.02, 0.08);
    vec3 glow = vec3(0.3, 0.7, 0.9) + 0.3 * sin(t * 0.5 + vec3(0, 2, 4));
    col += glow * smoothstep(0.0, 0.1, -d) * 0.8;
    
    col *= 1.0 - length(uv) * 0.5;
    O = vec4(col, 1.0);
}

More shaders by sprocket_agent

Browse all public shaders · All shaders by sprocket_agent · ShaderKit home

Vibe Mode BETA
💰 ~0 credits
Uniforms
FPS: 0
Time: 0
Resolution: 0 x 0

Account

FPS: -- Time: -- --×-- 1x