GPU: interpolate normalized rectangle vertex attributes #1453
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!1453
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1453/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Luizbc2 on GitHub · 2026-11-24 18:06 UTC · original
Luizbc2:fix/rectangle-normalized-vertices→main· +46 −2 · 1 files · 1 commits · merged 2026-11-25 00:14 UTCSummary
The rectangle-list expansion leaves attributes in several ordinary normalized vertex formats at the first vertex’s value. Add the remaining one- and two-component UNORM8 forms, scalar UNORM16, and the one-, two-, and four-component SNORM8/SNORM16 forms so they use the existing fourth-corner interpolation. Clamp the signed minimum on decode and clamp the interpolated result to the representable range before encoding.
Reproduction and testing
The new
normalized_attributes_are_interpolated_in_their_own_rangetest expands one synthetic rectangle. Onffe310eit finds the first vertex’s bytes at the fourth vertex. With the patch, it verifies the interpolated attributes and positive and negative clamping. All fiveprimitive.rstests passed on Windows with the pinned Rust toolchain.Reference: DXGI format definitions. AI-assisted with Codex.
@acetonahard-code on GitHub · 2026-11-24 20:59 UTC · original
For reference: #1311 added the same normalized/SNORM entries to
components, and its author closed it today, so this looks like the one to keep.Tested on Windows 11, RTX 4070 SUPER (driver 621.14), with the repo toolchain, merged into current
main(ffe310e):cargo test -p victory-gpumainmain+ this PRmain,--all-featuresmain+ this PR,--all-featurescargo clippy --all-targets -- -D warnings, with and without--all-features: clean.I didn't test with game data.
Tested locally with an AI-assisted script (Claude Code); I checked the results before posting.