summaryrefslogtreecommitdiff
path: root/shaders
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-08-20 17:10:22 -0300
committerGabriel Schneider <[email protected]>2026-08-25 09:42:06 -0300
commit70bde600793ea70bd68832018a154671c6bf1512 (patch)
treeaf477fd09881b85bf3ed735ede1afa254779b14f /shaders
parent7d2ade5ed706c67f30f54462684bced6a0978413 (diff)
downloadpardes-70bde600793ea70bd68832018a154671c6bf1512.tar.gz
pardes-70bde600793ea70bd68832018a154671c6bf1512.zip
animation: six character-motion panel transitions, composed in the core so backends agree
Diffstat (limited to 'shaders')
-rw-r--r--shaders/crt.ci.metal11
1 files changed, 9 insertions, 2 deletions
diff --git a/shaders/crt.ci.metal b/shaders/crt.ci.metal
index e1db5770..414e9cdc 100644
--- a/shaders/crt.ci.metal
+++ b/shaders/crt.ci.metal
@@ -102,6 +102,13 @@ bool pardesInside(float2 p, float4 box) {
p.x < box.x + box.z && p.y < box.y + box.w;
}
+// Character effects (ASCII byte walks, glyph motion, per-cell locks) are
+// composed in Pardes core, so this kernel never eases them: it clips their
+// panel batch and draws the finished glyphs.
+bool pardesComposedInCore(float effect) {
+ return effect == 4.0 || effect >= 6.0;
+}
+
float pardesPanelProgress(float effect, float frame) {
float frames = effect == 1.0 ? 12.0 :
effect == 2.0 ? 14.0 :
@@ -120,7 +127,7 @@ float pardesPanelProgress(float effect, float frame) {
return 1.0 + c3 * u * u * u + c1 * u * u;
}
if (effect == 3.0) return t * t * (3.0 - 2.0 * t); // dissolve
- return t; // ASCII cells are already composed; retained for ABI completeness
+ return t; // core-composed cells need no progress; retained for ABI completeness
}
// Prepare every geometric target before any translated panel is drawn. A
@@ -171,7 +178,7 @@ extern "C" float4 pardesPanel(
// ASCII bytes were already composed in Pardes core before CoreText built
// `current`. Pixel attachments have no character value and intentionally
// pass through unchanged, so this kernel only clips the pane batch.
- if (effect == 4.0) {
+ if (pardesComposedInCore(effect)) {
if (!pardesInside(coord, target)) return underneath;
return current.sample(current.transform(coord));
}