Repository navigation
Hunter bird: sample the person's outline clear of the idle reticle - #171
Merged
Merged
Conversation
test_person_has_white_fill_and_ink_outline checked the outline at v 0.62, exactly where the idle reticle's upper-right tick crosses the standing person's left edge. The tick wobbles through a sin-based hash, so where it lands differs by GPU: on llvmpipe (CI) it misses the sampled pixels, on Intel hardware Mesa it covers them in half-alpha rust and the ink check fails. Neither the shader nor the eyes change (#160) is at fault; the failure reproduces with the original #159 shaders. Sample at v 0.74 instead, above the reticle's reach, and assert that precondition from Buffer B so a future move of the reticle fails loudly rather than flakily. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cause
test_person_has_white_fill_and_ink_outlinesampled the person's left outline at body v 0.62. With nothing targeted, the reticle idles near the screen centre, and its upper-right tick crosses the standing person's left edge at exactly that height. Attention is drawn over the world, so wherever the tick lands it paints half-alpha rust over the outline.Where it lands depends on the GPU. The tick wobbles through a sin-based hash (
sdWobble/vnoise), and those hashes round differently on different drivers:(104, 47, 28), a mix of ink and rust. The test fails.The test is fragile, and neither side regressed:
2a4efd2) as well as with Hunter bird: two merged eyes, with lids and blinks inside each eye #160's two-eyes shaders. The eyes/lids change didn't cause it.drawPeoplehaven't changed since Hunter bird: a blob-tracker shader Setup, with the blob-records contract #159.LIBGL_ALWAYS_SOFTWARE=1makes the test pass on the same machine.Fix
The fix is in the test only. It samples the fill and outline at v 0.74, above the reticle's reach. That height is still inside the right eye's opening and clear of the top lid at the test's lid openness (about 0.70). The test now also asserts that precondition from Buffer B's reticle (centre, radius + 16 G tick reach). If the reticle ever moves into the sample, the test fails with a clear message instead of failing on some GPUs only. The fill and outline assertions themselves are unchanged.
Tests
python3 -m pytest -q ShowControl/FundingCAPTCHA/test_hunter_bird.py ShowControl/FundingCAPTCHA/test_shadertoy.py: 84 passed, on Intel hardware Mesa and withLIBGL_ALWAYS_SOFTWARE=1(llvmpipe).🤖 Generated with Claude Code