shaders: e4a9f58e3acfcf7b, project quad lanes that miss the decal box (black ground tiles at widths not a multiple of 128) #271
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/gamingwithhomie--larp!271
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-271"
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?
@matthieupl87-spec on GitHub · 2026-12-05 22:26 UTC · original
matthieupl87-spec:fix/decal-resolve-scalarized-derivatives→main· +28 −40 · 1 files · 1 commits · merged 2026-12-05 22:51 UTCWhat
CS_ProjDecalResolve_Scalarized(shaders/replace/e4a9f58e3acfcf7b.compute.hlsl) draws black 8 x 8 tiles on the ground at render widths that are not a multiple of 128. For example, 3440 x 1440 native, or 2288 x 960 under DLSS quality with a 3440 x 1440 output. Ultrawide players see it first (#26).Cause
In a uniform loop, the coarse derivatives read a coordinate for each quad lane. For a lane in the loop that failed the decal's box test, the file took the registers the pass's head wrote:
0,cz,cx,cy, and the high half of the decal's dword0xd0 + P. Those are world positions, not texture coordinates, so the gradients passed toSampleGradhad world-position size.Fix
Such a lane now gives the coordinate projected at its own position for this decal. This is what
c4183d3cbee28e8e(the vectorized resolve) already does. TheQ_FAILEDstate, thefailedargument and the constants that fed it are removed, and the header comment is updated. Only this one file changes.Tested
Tested in game on an RTX card with a Ryzen 7 5800X3D (Windows, Series X profile, 40 fps cap), with the VI-Ultrawide mod for 21:9:
e4a9f58e3acfcf7b(translation used instead) gives a clean ground. Removing only the classification pair does not.dxc(cs_6_6, the flags frombuild.rs).Not verified on the console: what the hardware's derivatives actually read from an inactive lane. The file already notes this as an assumption.
🤖 Generated with Claude Code