Cyber Circuit

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

Tron-style data flows on circuit board with glowing traces.

Tags: 2D, Cyberpunk, Circuit, Animation

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)

// Cyber Circuit - Tron-style data flows on circuit board
// Glowing traces with data packets

float hash(vec2 p) { return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453); }

float noise(vec2 p) {
    vec2 i = floor(p);
    vec2 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);
}

void mainImage(out vec4 fragColor, in vec2 fragCoord) {
    vec2 uv = (fragCoord - 0.5 * iResolution.xy) / iResolution.y;
    float t = iTime * 1.5;
    
    // Circuit board dark background
    vec3 col = vec3(0.02, 0.03, 0.05);
    
    // Grid pattern (circuit traces)
    vec2 gridUV = uv * 6.0;
    vec2 gridFract = fract(gridUV);
    
    // Grid lines
    float gridX = smoothstep(0.02, 0.0, abs(gridFract.x - 0.5));
    float gridY = smoothstep(0.02, 0.0, abs(gridFract.y - 0.5));
    
    // Randomly disable some grid segments (broken traces)
    vec2 gridID = floor(gridUV);
    float enabled = step(0.3, hash(gridID));
    
    float grid = max(gridX, gridY) * enabled;
    col += vec3(0.1, 0.3, 0.5) * grid * 0.5;
    
    // Data packets flowing along grid
    float data = 0.0;
    for(int i = 0; i < 8; i++) {
        float fi = float(i);
        vec2 packetPos = vec2(
            mod(t * (0.5 + fi * 0.1) + fi * 1.3, 6.0) - 3.0,
            floor(fi * 0.7) - 1.0 + fract(fi * 0.3) * 0.5
        );
        
        float d = length(uv - packetPos);
        float packet = smoothstep(0.08, 0.0, d);
        
        // Color based on packet "type"
        vec3 packetCol = vec3(0.0, 0.8, 1.0);
        if(mod(fi, 3.0) == 0.0) packetCol = vec3(1.0, 0.3, 0.8);
        if(mod(fi, 3.0) == 1.0) packetCol = vec3(0.3, 1.0, 0.5);
        
        col += packetCol * packet;
        
        // Trail behind packet
        vec2 trailUV = uv - packetPos;
        trailUV.x += 0.2;
        float trail = smoothstep(0.05, 0.0, abs(trailUV.y)) * smoothstep(0.3, 0.0, trailUV.x) * step(0.0, trailUV.x);
        col += packetCol * trail * 0.5;
    }
    
    // Central processing node
    float center = length(uv);
    float core = smoothstep(0.15, 0.0, center);
    float ring = smoothstep(0.25, 0.2, center) * smoothstep(0.15, 0.2, center);
    
    col += vec3(0.0, 0.9, 1.0) * core;
    col += vec3(0.5, 0.8, 1.0) * ring * (0.5 + 0.5 * sin(t * 3.0));
    
    // Scanlines
    float scan = sin(uv.y * 100.0 + t * 2.0) * 0.5 + 0.5;
    col *= 0.9 + scan * 0.1;
    
    // Vignette
    col *= 1.0 - length(uv) * 0.3;
    
    fragColor = 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