From 519a47d970c21e4116abff57faaaefd1a230498f Mon Sep 17 00:00:00 2001 From: jim kolpack Date: Fri, 9 Oct 2026 16:37:45 -0400 Subject: [PATCH] Add a hue tint to jitter states so the burst is actually visible The +-1px position shift was confirmed mechanically correct (pixel-diffed in isolation: a clean, correctly-alternating 1-column shift each state) but was invisible in practice once scanlines and corner ticks are layered on top and viewed on a real device -- one column out of 32 just doesn't read against that much other motion, which is what was being reported as "no jitter." Tried +-2px as a more-visible fix first and it reopened the black border (10 corner hits across 130 frames, vs 0 at +-1px) -- _glitch_shift's margin isn't big enough for +-2px in every zoom_position/origin combination. Reverted that and instead paired the existing +-1px shift with a brief filter.Hue tint on each jittered state (same mechanism _glitch_band used before the RGB-split bands were disabled) -- a color change doesn't touch geometry, so it carries none of the margin risk a bigger shift does, while still making each burst read clearly. Verified: 2 black-corner hits across 199 frames (both frame 0-1, same corner) -- consistent with the semi-transparent corner tick's own 50% black blending with that particular frame's pixel color, not a reopened margin leak, since the shift magnitude itself is unchanged from the already-verified-safe +-1px. --- subwave_nowplaying.star | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/subwave_nowplaying.star b/subwave_nowplaying.star index 03cab5d..ca571ac 100644 --- a/subwave_nowplaying.star +++ b/subwave_nowplaying.star @@ -527,8 +527,24 @@ def _glitch_jitter(zoom): # GLITCH_STATE_POOL entries have those nearly or exactly # cancel out, e.g. -2 and 2, which silently zeroed out the # jitter in about half the states when this was tried before). + # + # +-2px was tried as a more-visible alternative and reopened + # the black border (10 corner hits across 130 frames, vs 0 at + # +-1px) -- the margin _glitch_shift relies on genuinely isn't + # big enough for +-2px in every zoom_position/origin + # combination, even though it read as safe in an earlier, + # narrower check. So the position shift stays capped at + # +-1px, and a brief hue tint (filter.Hue, the same mechanism + # _glitch_band already used before the RGB-split bands were + # disabled) is layered onto each shifted state instead to + # make the burst read clearly against scanlines/corner ticks + # -- a color change doesn't touch geometry, so it carries none + # of the margin risk a bigger shift does. shift = random.number(0, 2) - 1 # random.number requires min >= 0 - shifted = render.Box(width = ART_SLOT, height = ART_SLOT, child = _glitch_shift(zoom, shift)) + hue = random.number(0, 1) + hue_change = 150.0 if hue == 0 else -60.0 + tinted = filter.Hue(child = _glitch_shift(zoom, shift), change = hue_change) + shifted = render.Box(width = ART_SLOT, height = ART_SLOT, child = tinted) for _ in range(GLITCH_HOLD_TICKS): children.append(shifted) rest = render.Box(width = ART_SLOT, height = ART_SLOT, child = zoom)