GPU: interpolate aligned diffuse probe seams on continuous depth #2138

Open
Yoshi-233 wants to merge 1 commit from upstream-pr/2138 into main
Yoshi-233 commented 2026-11-29 09:51:00 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Yoshi-233 on 2026-11-29T09:51:00Z.


On a sunlit wood floor, the untraced diffuse resolve can contain bright rectangular steps aligned to a 16-pixel grid. In one doorway capture, all 55 measured hard edges in the displayed floor patch had a corresponding step in the packed irradiance sampled by the material. The grain was visible across the boundary.

This adds an opt-in VICTORY_AMBIENT_PROBE_EDGES=1 pass after the untraced diffuse estimate. It checks for a sustained change at a grid boundary with continuous device depth. It interpolates the packed light between the measured colours on either side. The BVH path, constant-light mode and unequal light/depth extents skip the pass.

Reproducing the measurement

In daylight, open the porch door and stand on the threshold looking toward the kitchen. Use the same wood patch and angle for both settings. On my RTX 4070 Ti SUPER, Series X, DLSS Quality M (2560×1440 input and 3840×2160 output), 2× frame generation, BVH disabled, I obtained two on/off pairs in one player process.

Pair Segments with a luminance jump >½ stop, off → on Mean floor luminance on the 0–255 display scale, off → on
1 98 → 3 125.1 → 130.6
2 109 → 4 128.3 → 127.3

The p90 registration error across the pairs was at most 0.08 pixels at 480-pixel inspection width. The wood grain and sunlit band remain visible. Some corners of the diagonal light boundary still look angular. The cutoff can also catch a legitimate straight boundary in indirect light on a flat surface. Additional rooms and GPUs would help evaluate that trade-off before changing defaults.

Code and hardware checks

  • The gameplay figures above come from a local player backport with the same shader kernel. The local hardware fixture ran eight inputs on the NVIDIA adapter and WARP. A synthetic grid step fell from 0.750 to 0.061. Constant colour, a depth edge, a displaced edge, a small highlight, sky depth and a gradual slope kept their packed values. The compute pass uses group-shared memory with group barriers.
  • I tested the automatic merge of the submitted source branch onto 829188e96. All 14 Windows ambient::tests passed with the option disabled and again enabled. The staged source passed the asset check. I ran the ambient tests, not the full workspace suite. I have no frame-rate gain to report for this pass.

I checked for existing probe and interior-light patches. #1995 filters very bright outliers on dim surfaces. This PR is independent and covers a measured step on a moderately bright floor.

The Windows Clippy check stops at the existing unused unwind_copy in victory-loader. The loader change is tracked in #2019.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5549571000 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2138). Originally posted by [Yoshi-233](https://github.com/Yoshi-233) on 2026-11-29T09:51:00Z. --- On a sunlit wood floor, the untraced diffuse resolve can contain bright rectangular steps aligned to a 16-pixel grid. In one doorway capture, all 55 measured hard edges in the displayed floor patch had a corresponding step in the packed irradiance sampled by the material. The grain was visible across the boundary. This adds an opt-in `VICTORY_AMBIENT_PROBE_EDGES=1` pass after the untraced diffuse estimate. It checks for a sustained change at a grid boundary with continuous device depth. It interpolates the packed light between the measured colours on either side. The BVH path, constant-light mode and unequal light/depth extents skip the pass. **Reproducing the measurement** In daylight, open the porch door and stand on the threshold looking toward the kitchen. Use the same wood patch and angle for both settings. On my RTX 4070 Ti SUPER, Series X, DLSS Quality M (2560×1440 input and 3840×2160 output), 2× frame generation, BVH disabled, I obtained two on/off pairs in one player process. | Pair | Segments with a luminance jump >½ stop, off → on | Mean floor luminance on the 0–255 display scale, off → on | | --- | --- | --- | | 1 | 98 → 3 | 125.1 → 130.6 | | 2 | 109 → 4 | 128.3 → 127.3 | The p90 registration error across the pairs was at most 0.08 pixels at 480-pixel inspection width. The wood grain and sunlit band remain visible. Some corners of the diagonal light boundary still look angular. The cutoff can also catch a legitimate straight boundary in indirect light on a flat surface. Additional rooms and GPUs would help evaluate that trade-off before changing defaults. **Code and hardware checks** - The gameplay figures above come from a local player backport with the same shader kernel. The local hardware fixture ran eight inputs on the NVIDIA adapter and WARP. A synthetic grid step fell from 0.750 to 0.061. Constant colour, a depth edge, a displaced edge, a small highlight, sky depth and a gradual slope kept their packed values. The compute pass uses group-shared memory with group barriers. - I tested the automatic merge of the submitted source branch onto `829188e96`. All 14 Windows `ambient::tests` passed with the option disabled and again enabled. The staged source passed the asset check. I ran the ambient tests, not the full workspace suite. I have no frame-rate gain to report for this pass. I checked for existing probe and interior-light patches. #1995 filters very bright outliers on dim surfaces. This PR is independent and covers a measured step on a moderately bright floor. The Windows [Clippy check](https://github.com/trustno1-coder/VIctory-NVIDIA/actions/runs/46249413405/job/141303967623) stops at the existing unused `unwind_copy` in `victory-loader`. The loader change is tracked in #2019.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2138:upstream-pr/2138'
git switch 'upstream-pr/2138'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2138'
git switch 'upstream-pr/2138'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2138'
git switch 'upstream-pr/2138'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2138'
git switch 'main'
git merge --squash 'upstream-pr/2138'
git switch 'main'
git merge --ff-only 'upstream-pr/2138'
git switch 'main'
git merge 'upstream-pr/2138'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
trustno1-coder/VIctory-NVIDIA!2138
No description provided.