Shader system: hot-swappable GLSL effects with audio textures

2026-03-17

What happened

Pulled shader logic into its own module (shaders.c). Shaders load from a directory at startup, indexed alphabetically. Each file is just a void main() body — the engine prepends a standard header that injects the uniforms: image_tex, audio_tex, fft_tex, uv, u_time, and u_p[15] for user parameters.

Three initial shaders beyond the default waveform overlay:

Also added a shader_audio.lua patch that drives plasma parameters each frame from FFT bins — bass controls speed, high-mids control image blend.

Switching shaders is instant: vj.shader(i) from Lua, or /vj/shader i over OSC once that handler gets wired up.


commits: 015c7ae

← All devlog entries