- Python 49.3%
- GLSL 48.3%
- Shell 1.7%
- Nix 0.7%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| shaders | ||
| tests | ||
| .gitignore | ||
| README.md | ||
| shell.nix | ||
| treppe_gl.py | ||
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"
Options: --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.
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".