Shadow rays without structures are occluded, not lit: no grid of white dots in the shade #3874
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!3874
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3874"
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?
@stasadance on GitHub · 2026-11-30 10:02 UTC · original
stasadance:fix/shadow-rays-no-structure→main· +90 −2 · 4 files · 1 commits · merged 2026-11-30 14:12 UTCWhat it changes
With the ray-tracing structure builder off,
victory playsetsVICTORY_BVH_MISS=1and every node test misses.CS_RaytraceShadows_Mixed(0873f80dd84a3c5c) traces one ray per block of pixels at a jittered place and writes the ray's entry (bit 15 set: occluded) only when its walk ends on a triangle. A miss leaves the entry as it was, which the title reads as lit. So every shadow ray in the shade came out lit, and the title's filter spread each into a small disc: a regular grid of white dots on walls, skin, clothes and railings in shade.Now, in programs named
CS_RaytraceShadows*, a node test underVICTORY_BVH_MISSorVICTORY_BVH_NO_HITanswers as occluding geometry would: a box enters one child (a triangle one node past the structure's start), and a triangle is hit just short of the ray's end. The program still runs and marks its rays itself, and nothing is read by the node test. Reflection, probe, water and collision rays miss as before, and with the builder on the walk is the title's.VICTORY_SHADOW_RAYS_LIT=1makes shadow rays miss too, as before (it's part of the shader cache key).How it was tested
cargo testpassed for the crates it touches:cargo test -p victory-shader --libon a Linux host, 295 passed (the newshadow_ray_programs_are_told_by_nameis in the Windows-only emit tests);cargo xwin clippyfor the Windows target adds no warning over current main.Checked for overlap