aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authoruser <user@clank>2026-08-15 00:09:23 +0200
committeruser <user@clank>2026-08-15 00:09:23 +0200
commitf4e4e52ff9293b413bd477464ccf492c063e9442 (patch)
treea8714ea0bf1bd1d02fa23e96cae2f0c6f219dc19 /src
parentcontrib: presets worth stealing, and a test that they do anything (diff)
downloadslosh-f4e4e52ff9293b413bd477464ccf492c063e9442.tar.gz
slosh-f4e4e52ff9293b413bd477464ccf492c063e9442.tar.xz
slosh-f4e4e52ff9293b413bd477464ccf492c063e9442.zip
contrib: the shadertoy presets, usable in sl0ppty
They only existed in a browser, which is a strange place for a terminal multiplexer's shaders to live. Now each one is a file you can paste. contrib/shaders/ holds all thirty-two, one per file, *generated* from the presets in shadertoy.html by contrib/gen-shaders. The page stays the source: it is where they are written, previewed and conformance-tested against the compiler, and a hand-kept second copy would drift the day after it was written. `gen-shaders --check` says whether the files are current, which is a test, so the drift is a failing build rather than a stale example. contrib/shader-tour cycles a session through them, in the shape theme-tour already established — write the config the session watches and let the watcher do the rest. It takes one shader, one group, or nothing for all of them, and it resolves a short name (`torch`) as well as the whole slug (`guides-torch`), because nobody remembers which group a shader is in. The tour writes the theme alongside the shader: shaders resolve default-coloured text through theme's default_fg/default_bg, so a preset judged without one is being judged against a guess. The new test is the one that matters. Every shipped file is loaded into a real session and has to *change the cells of a pane* -- an example that previews beautifully and does nothing when pasted is worse than no example, and neither the toy's conformance test nor a config parse would notice. Three of them are then checked for the specific thing they claim: scanlines alternate row by row, indent guides land on every fourth column, a flat dim is flat. One session, reloaded per preset, which is both quick and a fair exercise of the path anyone will actually use. Renamed the "the built-ins, as expressions" group to drop the qualifier from its filenames; it was generating built-ins-as-expressions-scanlines.kdl, which is a sentence rather than a name.
Diffstat (limited to 'src')
0 files changed, 0 insertions, 0 deletions