Tighten screenshot comparison coverage#1730
Open
matthargett wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the Playground visual regression configuration to better handle pixel-diff variability and to add new texture repetition baseline tests.
Changes:
- Added per-test pixel comparison tuning via
thresholdand/orerrorRatiofor several existing tests. - Added two new “Texture Repetition” playground entries with reference images and engine exclusions.
5b1c447 to
b85623e
Compare
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.
Summary
Why
The default screenshot budget allows up to 2.5% of pixels to differ. On the current 600x400 references that is roughly 6,000 pixels, which is large enough for visible but spatially small failures to pass. In recent native validation on my wgpu fork, this hid or nearly hid issues such as dim/underdrawn GUI Slate header controls, compact GUI3D/Near Menu differences, GUI gradient color/alpha errors, and material-specific texture repetition mismatches.
The new budgets keep broad per-channel anti-aliasing/color tolerance where needed, but lower the allowed differing-pixel count for tests whose important content occupies a small part of the screenshot. The texture repetition pair also adds a useful control: Standard Material was effectively exact in native validation, while the PBR variant exposed a real material-path mismatch that should not be treated as acceptable drift.
Validation
Apps/Playground/Scripts/config.jsonwith Node to verify valid JSONgit diff --checkNote
I didn't run the entire screenshot test suite on my fork, just first first 50-60 and then bug deep on GUI 3D and Canvas-related things. if doing an audit of the full suite and tightening/updating things would be helpful/welcome, I'm happy to do it.