Shadow rays without structures are occluded, not lit: no grid of white dots in the shade #3874
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by stasadance on 2026-11-30T10:02:12Z.
What 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