Conversation
Wumpf
commented
Feb 11, 2025
4 tasks
Contributor
|
Web viewer built successfully. If applicable, you should also test it:
Note: This comment is updated whenever you push a commit. |
Member
emilk
approved these changes
Feb 12, 2025
CONTRIBUTING.md
Outdated
Comment on lines
+169
to
+199
|
|
||
| First check whether the difference is due to a change in enabled rendering features, potentially due to difference in hardware (/software renderer) capabilitites - our setup generally avoids this by enforcing the same set of features, but this may happen nonetheless. | ||
|
|
||
| However, smaller discrepancies may be caused by a variety of implementation details depending on the concrete GPU/driver (even between different versions of the same driver). | ||
| For instance: | ||
| * multi-sample anti-aliasing | ||
| * sample placement and sample resolve steps are implementation defined | ||
| * alpha-to-coverage algorithm/pattern can wary wildly between implementations | ||
| * by default we render without anti-aliasing | ||
| * texture filtering | ||
| * different implementations may apply different optimizations *even* for simple linear texture filtering | ||
| * out of bounds texture access (via `textureLoad`) | ||
| * implementations are free to return indeterminate values instead of clamping | ||
| * floating point evaluation, for details see [WGSL spec § 15.7. Floating Point Evaluation](https://www.w3.org/TR/WGSL/#floating-point-evaluation). Notably: | ||
| * rounding mode may be inconsistent | ||
| * floating point math "optimizations" may occur | ||
| * depending on output shading language, different arithmetic optimizations may be performed upon floating point operations even if they change the result | ||
| * floating point denormal flush | ||
| * even on modern implementations, denormal float values may be flushed to zero | ||
| * `NaN`/`Inf` handling | ||
| * whenever the result of a function should yield `NaN`/`Inf`, implementations may free to yield an indeterminate value instead | ||
| * builtin-function function precision & error handling (trigonometric functions and others) | ||
| * [partial derivatives (dpdx/dpdx)](https://www.w3.org/TR/WGSL/#dpdx-builtin) | ||
| * implementations are free to use either `dpdxFine` or `dpdxCoarse` | ||
| * [...] | ||
|
|
||
|
|
||
| Whenever you can't avoid these problems there's two types of thresholds you can tweak: | ||
| * threshold for when a pixel is considered different (see [`egui_kittest::SnapshotOptions::threshold`]) | ||
| * how many pixels are allowed to differ (see [`HarnessExt::snapshot_with_broken_pixels_threshold`]) | ||
| TODO(emilk/egui#5683): this should be natively supported by kittest |
Member
There was a problem hiding this comment.
This is a wonderful section that would be great to have in the egui_kittest README.md. Then we could just link to it from here instead
Member
Author
There was a problem hiding this comment.
I'll create a PR against egui_kittest!
| //! However, GPUs are notoriously bad at processing instances with a small batch size as | ||
| //! [various](https://gamedev.net/forums/topic/676540-fastest-way-to-draw-quads/5279146/) | ||
| //! [people](https://gamedev.net/forums/topic/702292-performance-fastest-quad-drawing/5406023/) | ||
| //! However, at least historically GPUs are notoriously bad at processing instances with a small batch size as |
Member
Author
There was a problem hiding this comment.
yeah, the other links broke and ci complained about it. Also I read by now that modern GPUs no longer have this issue (... on the GameDev Tech Slack, so can't post a source), do doesn't hurt to tune it down
Member
Author
|
Wumpf
added a commit
to emilk/egui
that referenced
this pull request
Feb 18, 2025
Guidelines & why images may differ Based on (but slightly altered): * rerun-io/rerun#8989
lucasmerlin
pushed a commit
to emilk/egui
that referenced
this pull request
Mar 3, 2025
Guidelines & why images may differ Based on (but slightly altered): * rerun-io/rerun#8989 (cherry picked from commit 40f002f)
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.
Addition of many image comparison tests highlighted that we need to document our tests.
Took the opportunity to list all test types we have that I could think of and how to run time.
Furthermore, this now now serves as an faq for "but why does machine X produce a different image than machine Y??" (A: it's a wonder they're as close as they are ;-))