diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-28 16:30:57 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:15 -0300 |
| commit | 1ed34e1538f45daecc2c8a551dc0fb7aba5f3f54 (patch) | |
| tree | eddcf21a1e5b35f7871b521c747e851b1134f512 /shaders/post/prefix.glsl | |
| parent | be09d1ec7abd71f4e52f05942a941d76b6d420f2 (diff) | |
| download | pardes-1ed34e1538f45daecc2c8a551dc0fb7aba5f3f54.tar.gz pardes-1ed34e1538f45daecc2c8a551dc0fb7aba5f3f54.zip | |
Crt, Ripple and Glitch take a level, 0 to 3, tunable at run time
Coordinator's request: `Crt 0..3` (likewise Ripple, Glitch), 0 off, `on`
the default level 2 (the polished rewrite), `off` and a bare word as
before. The level is one uniform (pardesLevel, beside pardesOpaque in the
prefix's own block); each pass picks its constants by it. Level 3 is at
least as strong as the old effects, measured as pixels changed by more
than 8 in a channel against a plain frame: Crt 18.3% (old 17.4%), Ripple
11.1% (9.5%), Glitch 9.3% a frame (8.1%); Glitch's level raises how often
it bursts as well as how hard. Config and ctl report `Crt 2` / `Crt off`.
Shared files touched: ninep/ctl.zig (the report line). Not touched:
pardes.zig, Messages.zig, mouse.zig, gui.zig, detached/*.
Diffstat (limited to 'shaders/post/prefix.glsl')
| -rw-r--r-- | shaders/post/prefix.glsl | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/shaders/post/prefix.glsl b/shaders/post/prefix.glsl index efa49483..e718a98f 100644 --- a/shaders/post/prefix.glsl +++ b/shaders/post/prefix.glsl @@ -39,12 +39,19 @@ layout(set = 3, binding = 0, std140) uniform Globals { uniform vec3 iSelectionBackgroundColor; }; -// pardes's own: 1 when the window is opaque, so a pass cannot punch holes -// in it through its alpha. +// pardes's own: pardesOpaque is 1 when the window is opaque, so a pass +// cannot punch holes in it through its alpha; pardesLevel is a bundled +// pass's strength, 1 to 3 (`Crt 3`), and 0 for a user's file. layout(set = 3, binding = 1, std140) uniform PardesPost { float pardesOpaque; + float pardesLevel; }; +// A bundled pass's constant at levels 1, 2 and 3. +float pardesByLevel(float one, float two, float three) { + return pardesLevel < 1.5 ? one : (pardesLevel < 2.5 ? two : three); +} + #define CURSORSTYLE_BLOCK 0 #define CURSORSTYLE_BLOCK_HOLLOW 1 #define CURSORSTYLE_BAR 2 |
