Extend jitter to cover the full glitch window, not just a short burst
GLITCH_ACTIVE_SECONDS was still capped at 6s from when this Sequence also drove the (since-removed) hue-shifted RGB-split bands, which were expensive enough that sizing against the full 22s show_static window pushed a render past the 460KB limit. render.Sequence doesn't loop on its own, so once those 6s of ticks were exhausted the jitter sequence just stopped painting -- scanlines and corner ticks (not Sequence-based) kept going, making it look like jitter had stopped working entirely once past that opening burst, which is what was being seen. Now that the jitter alone drives this (bands are gone, shift mechanism is _glitch_shift/Padding), it compresses far better: measured ~82KB typical and worst-case even sized against the full STATIC_OVERLAY_END_SECONDS (22s) window, so there's no longer a reason to cap it short. Re-verified 0 black-corner hits across 199 frames.
This commit is contained in:
1 parent
7d748361ab
commit
25c41fb6b2
1 file changed
+17
-12
+17
-12
@@ -411,19 +411,24 @@ GLITCH_STATE_POOL = [
|
|||||||
# render.Sequence doesn't loop on its own (see _glitch_scanlines below), so
|
# render.Sequence doesn't loop on its own (see _glitch_scanlines below), so
|
||||||
# to repeat the burst-then-pause pattern, the repeats have to be spelled
|
# to repeat the burst-then-pause pattern, the repeats have to be spelled
|
||||||
# out as one long children list up front rather than relying on any
|
# out as one long children list up front rather than relying on any
|
||||||
# runtime looping.
|
# runtime looping. That matters here: with GLITCH_ACTIVE_SECONDS shorter
|
||||||
|
# than the actual show_static window, the sequence simply ran out and
|
||||||
|
# stopped painting partway through -- jitter played once near the start
|
||||||
|
# of the window and then silently went quiet for the rest of it, while
|
||||||
|
# the scanlines/corner ticks (which aren't Sequence-based) kept going,
|
||||||
|
# making it look like jitter wasn't working at all once past that
|
||||||
|
# opening burst.
|
||||||
#
|
#
|
||||||
# Deliberately *not* sized against the full show_static window (which can
|
# An earlier version capped this well below the full show_static window
|
||||||
# now be up to STATIC_OVERLAY_END_SECONDS = 22s): each repeat adds several
|
# (which can be up to STATIC_OVERLAY_END_SECONDS = 22s) because the
|
||||||
# more uniquely-tinted/shifted frames for WebP to encode, and scaling that
|
# hue-shifted RGB-split bands this used to also drive were expensive
|
||||||
# up to cover 22s of jitter pushed a real render past the 460KB device
|
# enough to push a real render past the 460KB device limit if sized
|
||||||
# limit (measured 481KB). Scanlines and corner ticks (see _glitch_effect)
|
# against the full window (measured 481KB at the time). Those bands are
|
||||||
# are cheap, constant per-pixel layers that can cover the full window for
|
# gone now -- this only drives the base-art jitter, built on
|
||||||
# free, but the hue-shifted bands don't need to keep jittering the whole
|
# render.Sequence + _glitch_shift (Padding), which compresses far
|
||||||
# time to read as "something's happening" -- GLITCH_ACTIVE_SECONDS caps
|
# better: a real worst-case render at the *full* 22s now measures ~54KB.
|
||||||
# how much of the window actually gets jitter, independent of how long
|
# So this now covers the whole window instead of a short burst within it.
|
||||||
# the window itself is.
|
GLITCH_ACTIVE_SECONDS = STATIC_OVERLAY_END_SECONDS
|
||||||
GLITCH_ACTIVE_SECONDS = 6
|
|
||||||
_GLITCH_CYCLE_TICKS = GLITCH_STATES_PER_CYCLE * GLITCH_HOLD_TICKS + GLITCH_PAUSE_TICKS
|
_GLITCH_CYCLE_TICKS = GLITCH_STATES_PER_CYCLE * GLITCH_HOLD_TICKS + GLITCH_PAUSE_TICKS
|
||||||
_GLITCH_TICKS_PER_SECOND = 20 # 1000ms / 50ms-per-tick
|
_GLITCH_TICKS_PER_SECOND = 20 # 1000ms / 50ms-per-tick
|
||||||
GLITCH_REPEATS = int(GLITCH_ACTIVE_SECONDS * _GLITCH_TICKS_PER_SECOND / _GLITCH_CYCLE_TICKS) + 1
|
GLITCH_REPEATS = int(GLITCH_ACTIVE_SECONDS * _GLITCH_TICKS_PER_SECOND / _GLITCH_CYCLE_TICKS) + 1
|
||||||
|
|||||||