forked from mirrors/zig-glsl-view
GLSL + Zig + OSC
shaders | ||
src | ||
.gitignore | ||
build.zig | ||
config.yaml | ||
README.md |
zig-glsl-view
Renders a hot-reloaded fragment shader to one or more output windows.
All shader uniform
values are writable via OSC at /param/<uniform name>/set
- build and run via
zig build run
- install to
~/bin/glsl-osc
viazig build --prefix ~
configuration
configuration is read from config.yaml
in the current working directory
fragment
(str
): path to GLSL fragment shader.width
(int
): horizontal rendering resolution. defaults to1920
.height
(int
): vertical rendering resolution. defaults to1080
.outputs
: list of outputs. defaults to one 800x600 window. each output is a dictionary with the following keys:type
(str
): currently alwayswindow
.width
(int
): window width. defaults to800
.height
(int
): window height. defaults to600
.fullscreen
(bool
): defaults tofalse
.monitor
(str
): screen name to use for fullscreen. defaults to secondary screen.transparent
(bool
): transparent instead of black frame buffer background. defaults tofalse
.
osc
: either a 'liblo URL' or dictionary with the following keys:protocol
(str
):udp
,tcp
orunix
. defaults toudp
.port
(int
): port to bind to. defaults to9000
.
OSC / libio URLs
Unfortunately undocumented by libio. The following formats are valid:
osc.udp://localhost:1234
osc.udp://224.0.1.9:1234
(multicast IP)osc.tcp://:1234
osc.unix://localhost/tmp/mysocket
building / dependencies
Build successfully works with:
zig 0.9.1 and 0.10.0-dev.3555+7e07f3d4
glfw-x11 3.3.8-1
libepoxy 1.5.10-1
libyaml 0.2.5-1
liblo 1:0.31-2