Pr/reflection miss #3580

Closed
BaRian29 wants to merge 2 commits from upstream-pr/3580 into main
BaRian29 commented 2026-11-30 01:21:59 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by BaRian29 on 2026-11-30T01:21:59Z.


Reflections: the miss program runs again where leaving it out left noise

Branch: BaRian29:pr/reflection-miss (two commits on main 41adb551)
Open: https://github.com/trustno1-coder/VIctory-NVIDIA/compare/main...BaRian29:VIctory-NVIDIA:pr/reflection-miss

Summary

Without the ray-tracing structures, the reflections' miss program is left out (sky_miss_left_out in draw.rs). It was left out for the opaque and the alpha layers alike. What the rays did not resolve then held earlier frames' bytes:

1. Transparent surfaces (the alpha layer). Water already kept its run for exactly that reason; glass needs the same. Without it, a yellow-green grain covered the car windows of the opening cutscene. Now only the opaque layer's run is left out (the white grain on parquet at grazing angles, 2026-11-27, which is why it was left out in the first place).

2. The opaque layer, when the reflection stand-in follows. Left out, the half-size reflection image, resolved from the frame before, fed those stale bytes back frame after frame: colour noise over a convex mirror and glowing blue patches on a cell floor (frame capture 14940; the writers of that image were found in the frame's operations, and leaving its last two passes out made the noise worse). The opaque run was left out for its sky light, the white grain. With the stand-in on (VICTORY_AMBIENT_SPECULAR), that light is the estimate along the reflected direction, so the opaque run is kept then. Without the stand-in it is left out as before.

miss_left_out(keep, estimated, layer) holds the rule; sky_miss_left_out passes crate::ambient::on(Role::Miss).

Evidence

RTX 4070 Ti SUPER, driver 621.40, Series S profile, 2026-11-29:

  • Car windows in the opening cutscene: grain gone with (1); checked on screen.
  • Convex mirror, cell floor in the prison, glass edges: clean with (2) and VICTORY_AMBIENT_SPECULAR=1; checked on screen and in a frame capture.
  • No change to the parquet case: the opaque run is still left out without the stand-in.

Switches

  • VICTORY_RAYMISS_KEEP=1 still runs the miss program for every layer, as before.

Testing

  • Clippy (both gates): no new warning against main (same 34 / 35 warnings; main fails -D warnings with errors in victory-shader and victory-loader that this branch does not touch).
  • cargo test -p victory-gpu --lib -- --test-threads=1: 922 passed, including the new miss_tests. The one failure, shader_cache::tests::every_switch_of_the_translator_is_in_the_key, is also on main.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5557302262 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3580). Originally posted by [BaRian29](https://github.com/BaRian29) on 2026-11-30T01:21:59Z. --- # Reflections: the miss program runs again where leaving it out left noise **Branch:** `BaRian29:pr/reflection-miss` (two commits on `main` 41adb551) **Open:** https://github.com/trustno1-coder/VIctory-NVIDIA/compare/main...BaRian29:VIctory-NVIDIA:pr/reflection-miss ## Summary Without the ray-tracing structures, the reflections' miss program is left out (`sky_miss_left_out` in `draw.rs`). It was left out for the opaque and the alpha layers alike. What the rays did not resolve then held earlier frames' bytes: **1. Transparent surfaces (the alpha layer).** Water already kept its run for exactly that reason; glass needs the same. Without it, a yellow-green grain covered the car windows of the opening cutscene. Now only the opaque layer's run is left out (the white grain on parquet at grazing angles, 2026-11-27, which is why it was left out in the first place). **2. The opaque layer, when the reflection stand-in follows.** Left out, the half-size reflection image, resolved from the frame before, fed those stale bytes back frame after frame: colour noise over a convex mirror and glowing blue patches on a cell floor (frame capture 14940; the writers of that image were found in the frame's operations, and leaving its last two passes out made the noise worse). The opaque run was left out for its sky light, the white grain. With the stand-in on (`VICTORY_AMBIENT_SPECULAR`), that light is the estimate along the reflected direction, so the opaque run is kept then. Without the stand-in it is left out as before. `miss_left_out(keep, estimated, layer)` holds the rule; `sky_miss_left_out` passes `crate::ambient::on(Role::Miss)`. ## Evidence RTX 4070 Ti SUPER, driver 621.40, Series S profile, 2026-11-29: - Car windows in the opening cutscene: grain gone with (1); checked on screen. - Convex mirror, cell floor in the prison, glass edges: clean with (2) and `VICTORY_AMBIENT_SPECULAR=1`; checked on screen and in a frame capture. - No change to the parquet case: the opaque run is still left out without the stand-in. ## Switches - `VICTORY_RAYMISS_KEEP=1` still runs the miss program for every layer, as before. ## Testing - Clippy (both gates): no new warning against `main` (same 34 / 35 warnings; `main` fails `-D warnings` with errors in `victory-shader` and `victory-loader` that this branch does not touch). - `cargo test -p victory-gpu --lib -- --test-threads=1`: 922 passed, including the new `miss_tests`. The one failure, `shader_cache::tests::every_switch_of_the_translator_is_in_the_key`, is also on `main`.
mstrmoos commented 2026-11-30 02:38:45 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by mstrmoos on 2026-11-30T02:38:45Z.


Tested a port of this on top of main 41adb551 (plus local changes that don't touch reflections).

  • Setup: RTX 5080, Series X profile, 2560x1440, DLSS Balanced, frame generation off, ray tracing off. A 150 s run in an outdoor save at noon by the water, with the same shader cache.
  • Frame time: 41.8 ms median. The four runs before it, without this change, measured 41.3 to 42.6. The card was 67% busy on the median, against 63-66% before, so running the alpha layer's miss program again costs nothing measurable here.
  • Image: water reflections and the pier look clean in the start, middle and end screenshots. I didn't drive to a car or a mirror in this run, so the glass case itself isn't confirmed by this test.
  • only_the_opaque_layers_miss_program_is_left_out_and_not_with_the_estimate passes.
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7267187346 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3580#issuecomment-7267187346). Originally posted by [mstrmoos](https://github.com/mstrmoos) on 2026-11-30T02:38:45Z. --- Tested a port of this on top of main 41adb551 (plus local changes that don't touch reflections). - Setup: RTX 5080, Series X profile, 2560x1440, DLSS Balanced, frame generation off, ray tracing off. A 150 s run in an outdoor save at noon by the water, with the same shader cache. - **Frame time:** 41.8 ms median. The four runs before it, without this change, measured 41.3 to 42.6. The card was 67% busy on the median, against 63-66% before, so running the alpha layer's miss program again costs nothing measurable here. - **Image:** water reflections and the pier look clean in the start, middle and end screenshots. I didn't drive to a car or a mirror in this run, so the glass case itself isn't confirmed by this test. - `only_the_opaque_layers_miss_program_is_left_out_and_not_with_the_estimate` passes.
ddam1k commented 2026-11-30 11:12:58 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by ddam1k on 2026-11-30T11:12:58Z.


Setup: RTX 4070 Ti SUPER 16 GB, driver 580.88, Windows 10 22H2, 32 GB RAM. Built from main 41adb55 + #3580 (also #3500 and #3749, which don't touch reflections). 1080p → 1440p, DLSS Performance, frame generation 2x, ray tracing off, REFLECTION ESTIMATE on (VICTORY_AMBIENT_SPECULAR=1).

Before (release v2026.11.29.04): green/yellow block artifacts on car paint, car windows and house windows, on every reflective surface I saw.
After: gone, on the same cars and windows, during a ~10 min drive through the city and highway.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7276705680 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3580#issuecomment-7276705680). Originally posted by [ddam1k](https://github.com/ddam1k) on 2026-11-30T11:12:58Z. --- Setup: RTX 4070 Ti SUPER 16 GB, driver 580.88, Windows 10 22H2, 32 GB RAM. Built from main 41adb55 + #3580 (also #3500 and #3749, which don't touch reflections). 1080p → 1440p, DLSS Performance, frame generation 2x, ray tracing off, REFLECTION ESTIMATE on (VICTORY_AMBIENT_SPECULAR=1). Before (release v2026.11.29.04): green/yellow block artifacts on car paint, car windows and house windows, on every reflective surface I saw. After: gone, on the same cars and windows, during a ~10 min drive through the city and highway.
trustno1-coder commented 2026-12-01 18:50:55 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-12-01T18:50:55Z.


Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7321666103 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3580#issuecomment-7321666103). Originally posted by [trustno1-coder](https://github.com/trustno1-coder) on 2026-12-01T18:50:55Z. --- Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

Pull request closed

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!3580
No description provided.