NVIDIA: rays miss unbuilt structures (purple plants) + NaN scrub #82
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!82
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-82"
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?
@vvzxcvv on GitHub · 2026-11-27 17:22 UTC · original
vvzxcvv:nvidia-bvh-miss-nan-scrub→main· +76 −3 · 4 files · 2 commits · merged 2026-11-28 19:01 UTCProblem
On NVIDIA, vegetation outdoors renders purple, magenta or violet instead of green, identically every run in the same spot. Separately, NaN or infinity values written by shaders can spread into black blobs (faces, sky) or white flashes through bloom, blur and the temporal upscaler.
1. Rays miss every node while the structure builder is off (VICTORY_BVH_MISS)
With the title's structure builder off (its wave64 programs don't run on NVIDIA), the ray-tracing structures are never built, but the node test in emit/intersect.rs still walked whatever lay in their memory. The screen-probe traces turned those false hits into violet and magenta light (the leftovers
826ba15partly filters), which shows most on vegetation. With the switch on, every node test is a miss without reading the node, so each walk ends at its first node. It stays off while VICTORY_BVH_BUILDER=1.This is a stopgap until the structure builder runs on NVIDIA; it switches itself off when VICTORY_BVH_BUILDER=1.
2. NaN scrub (VICTORY_NAN_SCRUB)
Pixel-shader colour exports and float image stores become 0 where |x| >= inf (NaN included), so one bad value can't spread through the title's blur and temporal passes.
Both are part of the shader cache key and on in the play settings. Both are ported from rorodev6's victory-nvidia-megafork.
Tested
RTX 4070 Ti SUPER (610.88), Ryzen 7 7800X3D, 32 GB, Windows 10 22H2 (Agility SDK 1.620), release build, Series S, DLSS Quality:
@eleboucher on GitHub · 2026-11-28 10:19 UTC · original
Two problems I found testing this on an RTX 4070 Ti SUPER (Windows 11, ray tracing on with VICTORY_RT_NATIVE=1):
bvh_miss()only turns itself off for VICTORY_BVH_BUILDER=1, butbuilder_asked()in pipeline/make.rs treats VICTORY_RT_NATIVE=1 as the builder running too. With RT_NATIVE and VICTORY_BVH_MISS=1 every ray missed (violet eyes in a close-up; brown irises after the fix).bvh_miss()result.The fix is one commit on top of this PR's head:
github.com/eleboucher/VIctory-NVIDIA@fb765c7c(branchup-bvh-miss-fixon eleboucher/VIctory-NVIDIA). It makesbvh_miss()public, also checks VICTORY_RT_NATIVE, and pushes its result into the cache key instead of the env var. Windows type-check andcargo test -p victory-shader --libpass on it.