Discovered while verifying paint finding #5 (PR #154), outside that finding's scope.
Context
compute_scroll_offset produces a translation applied by draw_animated_background to every preset, before dispatch. PR #154 bounded that translation to one tile period, which fixes the two genuinely periodic presets (grid_dots, heropattern).
The remaining problem
Three of the five presets are not periodic under translation, and already animate their own motion from speed / direction:
gradient_shift — direction drives the rotation sense (Cw/Ccw), and the shader is drawn over Rect::from_wh(width, height), with no margin. Any non-zero translation therefore leaves an uncovered band.
concentric_circles — computes its own offset = (time * speed) % spacing. The outer translation is a double animation, and translating a radial pattern moves its centre.
halo — animates its zones internally.
Before PR #154 the offset grew unbounded: the background eventually left the frame entirely. Afterwards the artefact is bounded (≤ 60px, tile_spacing's default) but still present, as a periodic jump.
Direction
Have compute_scroll_offset return (0.0, 0.0) for presets whose drawing is not periodic under translation — that is, keep the outer scroll only for grid_dots and heropattern, the two that have no motion of their own and genuinely depend on it.
To settle before doing it: this is a visible rendering change for any existing scenario declaring a direction on one of those three presets. The motion being removed is the one that makes the background disappear, so removing it is a fix — but the decision deserves to be made explicitly rather than slipped into a batch of fixes.
Suggested verification
One test per preset: the avg_luma of a 60px band on the edge opposite the scroll direction must stay stable for the whole scenario duration.
Discovered while verifying paint finding #5 (PR #154), outside that finding's scope.
Context
compute_scroll_offsetproduces a translation applied bydraw_animated_backgroundto every preset, before dispatch. PR #154 bounded that translation to one tile period, which fixes the two genuinely periodic presets (grid_dots,heropattern).The remaining problem
Three of the five presets are not periodic under translation, and already animate their own motion from
speed/direction:gradient_shift—directiondrives the rotation sense (Cw/Ccw), and the shader is drawn overRect::from_wh(width, height), with no margin. Any non-zero translation therefore leaves an uncovered band.concentric_circles— computes its ownoffset = (time * speed) % spacing. The outer translation is a double animation, and translating a radial pattern moves its centre.halo— animates its zones internally.Before PR #154 the offset grew unbounded: the background eventually left the frame entirely. Afterwards the artefact is bounded (≤ 60px,
tile_spacing's default) but still present, as a periodic jump.Direction
Have
compute_scroll_offsetreturn(0.0, 0.0)for presets whose drawing is not periodic under translation — that is, keep the outer scroll only forgrid_dotsandheropattern, the two that have no motion of their own and genuinely depend on it.To settle before doing it: this is a visible rendering change for any existing scenario declaring a
directionon one of those three presets. The motion being removed is the one that makes the background disappear, so removing it is a fix — but the decision deserves to be made explicitly rather than slipped into a batch of fixes.Suggested verification
One test per preset: the
avg_lumaof a 60px band on the edge opposite the scroll direction must stay stable for the whole scenario duration.