Repository navigation
Conversation
The rectangle-list geometry shader took a vertex as the corner between the other two only when it shared x with one and y with the other exactly, and every w had to be exactly the same. A vertex shader that computes each corner (a scale and an offset per vertex) can leave them a few bits apart; such a rectangle stayed the one triangle it came as and drew half of itself, cut along its diagonal. Corners now match within 1e-4 of the first vertex's w (under a fifth of a pixel at 3840 pixels across), for the corner test, the "no two vertices in one place" test and the equal-w test. rectangles_are_drawn_whole gets a case whose corners are a few bits apart; it fails with the old exact comparison (texel 0 left empty) and passes with this.
|
Independent test run on commit
AI use: Antigravity (Gemini 4 Neon) ran clippy/tests locally and wrote this report. |
|
Merged onto main 90228a7 and ran No change: every failure count matches main, and no new reason appears. What it changes at run time isn't covered by this check. |
RecompLive
added a commit
to RecompLive/victory-fork
that referenced
this pull request
Nov 25, 2026
`view_format` reads the host resource's description, which only exists on Windows, but it was compiled everywhere; its only callers (`descriptor.rs` and `descriptor/host.rs`) are already Windows-gated. `#[cfg(windows)]` on it lets victory-gpu build on Linux (upstream issue fxceless#90). Ported from Marvisak/VIctory PR #2008 (GPL-3.0-or-later); not built on Linux here, only checked on Windows.
oceansde012
pushed a commit
to oceansde012/victory-gta6
that referenced
this pull request
Nov 25, 2026
…rners match within a tolerance, not bit for bit (by António Mendes)
This was referenced Nov 25, 2026
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
The rectangle-list geometry shader (
emit/rect.rs) completes a console rectangle only when one vertex shares x with one of the others and y with the other exactly, and when every w is exactly the same (OEQ). Otherwise "three that differ in w, or are not such corners, stay the triangle they make".A vertex shader that computes each corner (a scale and an offset per vertex) can leave the corners a few bits apart. Such a rectangle then stays the one triangle it arrives as and draws half of itself, cut along its diagonal.
Corners now match within
1e-4of the first vertex's w (RECT_TOLERANCE, under a fifth of a pixel at 3840 pixels across), for the corner test, the "no two vertices in one place" test and the equal-w test. Exact matches behave as before.What is in it
same(OEQ) becomesclose(a, b, tol):-tol <= a - b <= tol, withtol = w0 * RECT_TOLERANCE. A negative or NaNtolmakes nothing close, so a non-positive w still stays a triangle, as before.rectangles_are_drawn_wholegets a case whose corners are a few bits apart:(-1, 1), (-1.00001, -1), (1, -0.99999).Tested
Windows 11 Pro 26300, RTX 5070 Ti 16 GB (driver 32.0.16.2140, 32-lane waves), Ryzen 7 9800X3D, Rust 1.98.1 MSVC (the pinned toolchain).
cargo test --release -p victory-shader: 210 passed, 0 failed, 2 ignored.RECT_TOLERANCEset to0.0(the old exact comparison), the new case fails:corner second, a few bits apart: texel 0 is [0.0, 0.0, 0.0, 0.0], not [-0.875, 0.875, 0.0, 1.0]. With1e-4it passes.Not tested
AI use: Claude Code (Claude Opus 5.5) found the exact comparison, wrote the change and the test, and ran the tests.