A stupid experiment in rendering 3D graphics to the terminal using the kitty graphics protocol
I've only tested it with Ghostty.
View the demo with different scenes:
cargo run --releaseRun shadertty, shadertoy but it runs in your terminal:
cargo run --release -- --shadertoy shader.glsl --ichannel0=perlin_noise.png- Uses wgpu to render graphics on the GPU.
- Blits the output texture to 2 double-buffered mmap'ed files using copy_texture_to_buffer
- Emits kitty graphics protocol escape code to instruct terminal to render one file as an image
- Uses spin_sleep to cap the render loop to 60 FPS
- I've only tested this on macOS and ghostty
- This only works for terminals which support the kitty graphics protocol
- There is no way to do vsync (that I know of)
- This was vibecoded in a weekend for fun