No description
  • Python 49.3%
  • GLSL 48.3%
  • Shell 1.7%
  • Nix 0.7%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
April John cebb41dbc7 Add fire, ocean, heartbeat, bounce, trans and storm shaders
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-16 15:03:47 +02:00
shaders Add fire, ocean, heartbeat, bounce, trans and storm shaders 2026-10-16 15:03:47 +02:00
tests Add brightness option and run/dry wrapper scripts 2026-10-16 14:38:55 +02:00
.gitignore Add treppe-gl shader renderer for treppe2000 2026-10-16 14:34:05 +02:00
README.md kik shader: derive step from resolution so the full preview scales 2026-10-16 14:52:49 +02:00
shell.nix Add treppe-gl shader renderer for treppe2000 2026-10-16 14:34:05 +02:00
treppe-dry.sh Add brightness option and run/dry wrapper scripts 2026-10-16 14:38:55 +02:00
treppe-run.sh Add brightness option and run/dry wrapper scripts 2026-10-16 14:38:55 +02:00
treppe_gl.py Add brightness option and run/dry wrapper scripts 2026-10-16 14:38:55 +02:00

treppe-gl

Render Shadertoy style GLSL shaders onto the treppe2000.

The shader is rendered into a 16x1 float framebuffer (x = stair step) and sent as RGBW16 UDP frames to the priority port (3124) of trepped on treppe.club.berlin.ccc.de. While it runs it overrides whatever else the stairs show. On exit it sends a black frame. The stairs power must be on (Bluescreen > Stairs).

nix-shell --run "python treppe_gl.py shaders/flow.glsl"
nix-shell --run "python treppe_gl.py shaders/pulse.glsl --dry-run"

Wrappers: ./treppe-run.sh <shader> [brightness] and ./treppe-dry.sh <shader> [brightness] (dry run, nothing is sent).

Options: --brightness 0-100 (scales output, default 100), --host, --port, --fps, --dry-run (send nothing), --no-window (headless), --white {extract,alpha,off}.

Shaders define mainImage(out vec4 fragColor, in vec2 fragCoord) and may use iResolution, iTime, iTimeDelta and iFrame. The file is reloaded when it changes; on a compile error the last working shader keeps running.

The same shader also runs at full size in the debug window, so derive the step from the resolution (floor(fragCoord.x / iResolution.x * 16.0)) or use fragCoord.x / iResolution.x, never raw fragCoord.x.

White channel: extract (default) sets w = min(r,g,b) and subtracts it from rgb, alpha uses the shader's alpha, off sends w = 0.

Debug window: top is the shader at full resolution, bottom are the 16 steps as sent (step numbers, colour, white bar). Steps 13-15 are greyed out, trepped only drives 13 channels. The step to channel mapping is done by trepped, frames are sent in step order.

Tests: nix-shell --run "python -m pytest tests".