summaryrefslogtreecommitdiff
path: root/shaders
diff options
context:
space:
mode:
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));
}