summaryrefslogtreecommitdiff
path: root/src/macos.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-28 16:44:51 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:15 -0300
commita007457cb007b03f310bca55c339e8cd5d9baafc (patch)
tree31e57644c6df2eef04fb3c2a200482571c6e6857 /src/macos.zig
parent1ed34e1538f45daecc2c8a551dc0fb7aba5f3f54 (diff)
downloadpardes-a007457cb007b03f310bca55c339e8cd5d9baafc.tar.gz
pardes-a007457cb007b03f310bca55c339e8cd5d9baafc.zip
Ripple and Glitch are gone; Crt stays
The user tried them live and wants them removed entirely: the builtins, their levels, config keys and leader paths (tR, tg), their slots in the built-in chain, their shaders (source and prebuilt), EffectCode paths, and on macOS their scene flags (pardes.h), the Metal kernel's coordinate warps and the Swift pointer mapping that mirrored them. Docs say so (decision 8 in docs/render-pipeline.md); config.md documents Crt's levels, Shader and ShaderAnimation instead. Shared files touched: macos.zig (flags). Not touched: pardes.zig, Messages.zig, mouse.zig, gui.zig, detached/*.
Diffstat (limited to 'src/macos.zig')
-rw-r--r--src/macos.zig17
1 files changed, 2 insertions, 15 deletions
diff --git a/src/macos.zig b/src/macos.zig
index 0bad86ee..6cd7838f 100644
--- a/src/macos.zig
+++ b/src/macos.zig
@@ -112,8 +112,6 @@ const cell_flag_default: u8 = 1;
const cell_flag_tagline: u8 = 2;
const cell_flag_hover: u8 = 4;
const scene_flag_crt: u32 = 1 << 0;
-const scene_flag_ripple: u32 = 1 << 1;
-const scene_flag_glitch: u32 = 1 << 2;
const scene_frame_hz: u32 = 60;
const scene_wrap_ns: u64 = 4096 * std.time.ns_per_s;
@@ -850,13 +848,11 @@ export fn pardes_should_quit() bool {
return st.core.quit;
}
-// The Metal shell keeps its own CRT, ripple and glitch kernel: the bundled
-// passes of the GUI's post chain, as flags.
+// The Metal shell keeps its own CRT kernel: the GUI's bundled post pass, as
+// a flag.
fn encodeSceneEffects(post: *const pardes.config.Runtime.Post) u32 {
var flags: u32 = 0;
if (post.has(.crt)) flags |= scene_flag_crt;
- if (post.has(.ripple)) flags |= scene_flag_ripple;
- if (post.has(.glitch)) flags |= scene_flag_glitch;
return flags;
}
@@ -2842,8 +2838,6 @@ test "pardes.h matches the Zig boundary" {
try expectEqual(@as(u8, c.PARDES_CELL_HOVER), cell_flag_hover);
try expectEqual(@as(u16, c.PARDES_TOPBAR_H), pardes.TOPBAR_H);
try expectEqual(@as(u32, c.PARDES_SCENE_CRT), scene_flag_crt);
- try expectEqual(@as(u32, c.PARDES_SCENE_RIPPLE), scene_flag_ripple);
- try expectEqual(@as(u32, c.PARDES_SCENE_GLITCH), scene_flag_glitch);
try expectEqual(@as(u8, c.PARDES_PANEL_OPENING), @intFromEnum(animation.Phase.opening));
try expectEqual(@as(u8, c.PARDES_PANEL_MOVING), @intFromEnum(animation.Phase.moving));
try expectEqual(@as(u8, c.PARDES_PANEL_CLOSING), @intFromEnum(animation.Phase.closing));
@@ -2918,13 +2912,6 @@ test "scene effect flags and display clock are compact and independent" {
try expectEqual(@as(u32, 0), encodeSceneEffects(&post));
_ = post.set(.crt, "", true);
try expectEqual(scene_flag_crt, encodeSceneEffects(&post));
- _ = post.set(.ripple, "", true);
- _ = post.set(.glitch, "", true);
- try expectEqual(scene_flag_crt | scene_flag_ripple | scene_flag_glitch, encodeSceneEffects(&post));
- try expectEqual(
- scene_flag_crt | scene_flag_ripple | scene_flag_glitch,
- encodeSceneEffects(.{ .crt = true, .ripple = true, .glitch = true }),
- );
var st: State = undefined;
st.scene_ns = scene_wrap_ns - (std.time.ns_per_ms * 5);