From 1b2c96a42efedb90d607dbc0390a78853b7fd147 Mon Sep 17 00:00:00 2001 From: jim kolpack Date: Fri, 9 Oct 2026 15:51:39 -0400 Subject: [PATCH] Spread the 6 scanlines evenly across the full height Skipping the last two of the 8 candidate positions (at y=24, 28) left an 8px gap with nothing in it at the bottom of every 32-row cycle. Skipping two interspersed positions instead (y=12, 28) spreads the resulting slightly-larger gaps across the full height instead of clustering them in one spot. --- subwave_nowplaying.star | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/subwave_nowplaying.star b/subwave_nowplaying.star index 078efff..899edd4 100644 --- a/subwave_nowplaying.star +++ b/subwave_nowplaying.star @@ -551,14 +551,18 @@ def _glitch_scanlines(): # the starting position, so the snap is invisible -- a standard # infinite-scrolling-texture trick -- while the translate distance # never has to leave the small range already confirmed safe. + # SCANLINE_PERIOD=4 over ART_SLOT=32 gives 8 evenly-spaced candidate + # positions (0, 4, 8, ..., 28); skipping 2 of those 8 (rather than + # changing the period itself, which the sweep's periodicity depends + # on) to land on 6 visible lines. Skipping two *interspersed* + # positions instead of the last two in the run -- which left an 8px + # gap with nothing in it at the bottom of every cycle -- spreads the + # resulting two, slightly-larger gaps across the full height instead. + SCANLINE_SKIP = (12, 28) tall = ART_SLOT + SCANLINE_PERIOD lines = [] for y in range(tall): - # SCANLINE_PERIOD=4 over ART_SLOT=32 gives 8 evenly-spaced lines - # per window; skipping 2 of those 8 positions (dropping the last - # two in each 32-row repeat, rather than changing the period - # itself) keeps the period dividing evenly into things cleanly. - if y % SCANLINE_PERIOD == 0 and (y % ART_SLOT) < ART_SLOT - 2 * SCANLINE_PERIOD: + if y % SCANLINE_PERIOD == 0 and (y % ART_SLOT) not in SCANLINE_SKIP: lines.append(render.Box(width = ART_SLOT, height = 1, color = "#00000080")) else: lines.append(render.Box(width = ART_SLOT, height = 1, color = "#00000000"))