forked from mirrors/zig-glsl-view
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.6 KiB
Markdown
45 lines
1.6 KiB
Markdown
# 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` via `zig 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 to `1920`.
|
|
- `height` (`int`): vertical rendering resolution. defaults to `1080`.
|
|
- `outputs`: list of outputs. defaults to one 800x600 window.
|
|
each output is a dictionary with the following keys:
|
|
- `type` (`str`): currently always `window`.
|
|
- `width` (`int`): window width. defaults to `800`.
|
|
- `height` (`int`): window height. defaults to `600`.
|
|
- `fullscreen` (`bool`): defaults to `false`.
|
|
- `monitor` (`str`): screen name to use for fullscreen. defaults to secondary screen.
|
|
- `transparent` (`bool`): transparent instead of black frame buffer background. defaults to `false`.
|
|
- `osc`: either a 'liblo URL' or dictionary with the following keys:
|
|
- `protocol` (`str`): `udp`, `tcp` or `unix`. defaults to `udp`.
|
|
- `port` (`int`): port to bind to. defaults to `9000`.
|
|
|
|
### 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
|
|
|