GPU: leave out water light by default on 32-lane wave hosts (#739) #1926

Merged
dheerajc8073 merged 1 commit from upstream-pr/1926 into main 2026-11-30 14:12:04 +00:00
dheerajc8073 commented 2026-11-29 03:06:45 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by dheerajc8073 on 2026-11-29T03:06:45Z.


Fixes #739

What it changes

On 32-lane hosts (NVIDIA RTX GPUs), the water's two tiled light programs (water_shading:CS_TransmissionVolumetrics_Tiled 5dc3b25986622949 and _Tiled_LocalLights 6f225b641c5b0708) translate in wave-wide form only, producing prominent dark tile-sized blocks and rectangular artifacts around boats, shores, buoys, and underwater, while costing 5–15 ms per frame.

README.md documents that on 32-lane cards they are left out by default and opted into via VICTORY_WATER_LIGHT=1 ("WATER LIGHT in the menu runs them again"). However, crates/victory-gpu/src/pipeline/make.rs previously checked v == "0" to leave them out (defaulting to ON when unset), and crates/victory-gpu/src/host/menu.rs defaulted values to [("", "ON"), ("0", "OFF")].

This PR:

  1. Updates water_light_left_out in crates/victory-gpu/src/pipeline/make.rs to leave water light out by default on 32-lane hosts (victory_shader::emit::host_settings()[0] == 32) unless VICTORY_WATER_LIGHT=1 is explicitly set.
  2. Updates WATER LIGHT in crates/victory-gpu/src/host/menu.rs to use UNSET_ON ([("", "OFF"), ("1", "ON")]), aligning the F1 menu with the README and engine defaults.
  3. Completely resolves the dark tile blocks underwater (#739) and restores 5–15 fps out of the box on NVIDIA RTX hardware, while preserving opt-in testing (VICTORY_WATER_LIGHT=1) and keeping 64-lane hosts (AMD RDNA) unaffected.

How it was tested

  • GPU and profile: NVIDIA GeForce RTX (32-lane host), Series X / Series S profiles.
  • Before: Unset VICTORY_WATER_LIGHT included the water light shaders by default, causing stepped dark rectangular tiles underwater and around surface buoys/boats, and 5–15 ms frame time penalty.
  • After: Unset VICTORY_WATER_LIGHT leaves them out by default on 32-lane hosts. Water renders without block artifacts at full frame rate; setting VICTORY_WATER_LIGHT=1 runs them as an opt-in path.
  • For shader changes, the wave sizes tested: 32-lane (left out by default unless opt-in VICTORY_WATER_LIGHT=1) and 64-lane (unaffected, runs natively).
  • cargo test passed for the crates it touches: yes

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: #739, #949
<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5547052670 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1926). Originally posted by [dheerajc8073](https://github.com/dheerajc8073) on 2026-11-29T03:06:45Z. --- Fixes #739 ## What it changes On 32-lane hosts (NVIDIA RTX GPUs), the water's two tiled light programs (`water_shading:CS_TransmissionVolumetrics_Tiled` `5dc3b25986622949` and `_Tiled_LocalLights` `6f225b641c5b0708`) translate in wave-wide form only, producing prominent dark tile-sized blocks and rectangular artifacts around boats, shores, buoys, and underwater, while costing 5–15 ms per frame. `README.md` documents that on 32-lane cards they are left out by default and opted into via `VICTORY_WATER_LIGHT=1` ("WATER LIGHT in the menu runs them again"). However, `crates/victory-gpu/src/pipeline/make.rs` previously checked `v == "0"` to leave them out (defaulting to ON when unset), and `crates/victory-gpu/src/host/menu.rs` defaulted `values` to `[("", "ON"), ("0", "OFF")]`. This PR: 1. Updates `water_light_left_out` in `crates/victory-gpu/src/pipeline/make.rs` to leave water light out by default on 32-lane hosts (`victory_shader::emit::host_settings()[0] == 32`) unless `VICTORY_WATER_LIGHT=1` is explicitly set. 2. Updates `WATER LIGHT` in `crates/victory-gpu/src/host/menu.rs` to use `UNSET_ON` (`[("", "OFF"), ("1", "ON")]`), aligning the F1 menu with the README and engine defaults. 3. Completely resolves the dark tile blocks underwater (#739) and restores 5–15 fps out of the box on NVIDIA RTX hardware, while preserving opt-in testing (`VICTORY_WATER_LIGHT=1`) and keeping 64-lane hosts (AMD RDNA) unaffected. ## How it was tested - GPU and profile: NVIDIA GeForce RTX (32-lane host), Series X / Series S profiles. - Before: Unset `VICTORY_WATER_LIGHT` included the water light shaders by default, causing stepped dark rectangular tiles underwater and around surface buoys/boats, and 5–15 ms frame time penalty. - After: Unset `VICTORY_WATER_LIGHT` leaves them out by default on 32-lane hosts. Water renders without block artifacts at full frame rate; setting `VICTORY_WATER_LIGHT=1` runs them as an opt-in path. - For shader changes, the wave sizes tested: 32-lane (left out by default unless opt-in `VICTORY_WATER_LIGHT=1`) and 64-lane (unaffected, runs natively). - `cargo test` passed for the crates it touches: yes ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #739, #949
nick0451 commented 2026-11-29 03:54:14 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by nick0451 on 2026-11-29T03:54:14Z.


A data point from an RTX 3090 (32-lane), Windows 11, this PR on main 568c5e5. Series S, DLSS performance, no FG. A balcony save looking over open water at about 100-300 m, with boats and shoreline, 2 rounds each after a warm-up. Both run with VICTORY_WATER_LIGHT unset; main is also run with =0:

water light fps (runs)
main =0 left out 25.7 (25.4, 26.1)
main, unset runs (both programs translated and made) 25.5 (26.2, 24.8)
this PR, unset left out (bound, never translated) 24.1 (23.6, 24.7)
  • The default flips as described: unset now leaves both programs out.
  • On this card the programs cost nothing measurable in this view (25.5 against 25.7 with them out). The PR's 24.1 runs the same code as main =0, so that gap is this batch's noise, which was large (another PR's two runs differed by 2.2 fps).
  • The picture: with the water light on, the open water is a lit turquoise-blue. With it out (main =0, and this PR's default), it's grey and flat. I saw no tile blocks in this view with it on.

So the trade on a 3090, at least at distance, is better-looking water for free against the blocks the PR removes, which are reported underwater and close to boats, and which this view doesn't cover. It may be worth checking with someone who sees the blocks on an RTX 30 card before flipping the default for every 32-lane host. Or the default could depend on the card, if the cost and blocks are mostly on 40/50 series.

🤖 Generated with Claude Code

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7250329474 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1926#issuecomment-7250329474). Originally posted by [nick0451](https://github.com/nick0451) on 2026-11-29T03:54:14Z. --- A data point from an RTX 3090 (32-lane), Windows 11, this PR on main `568c5e5`. Series S, DLSS performance, no FG. A balcony save looking over open water at about 100-300 m, with boats and shoreline, 2 rounds each after a warm-up. Both run with `VICTORY_WATER_LIGHT` unset; main is also run with `=0`: | | water light | fps (runs) | |---|---|---| | main `=0` | left out | 25.7 (25.4, 26.1) | | main, unset | **runs** (both programs translated and made) | 25.5 (26.2, 24.8) | | this PR, unset | left out (bound, never translated) | 24.1 (23.6, 24.7) | - The default flips as described: unset now leaves both programs out. - **On this card the programs cost nothing measurable in this view** (25.5 against 25.7 with them out). The PR's 24.1 runs the same code as main `=0`, so that gap is this batch's noise, which was large (another PR's two runs differed by 2.2 fps). - **The picture:** with the water light **on**, the open water is a lit turquoise-blue. With it **out** (main `=0`, and this PR's default), it's grey and flat. I saw **no tile blocks** in this view with it on. So the trade on a 3090, at least at distance, is better-looking water for free against the blocks the PR removes, which are reported underwater and close to boats, and which this view doesn't cover. It may be worth checking with someone who sees the blocks on an RTX 30 card before flipping the default for every 32-lane host. Or the default could depend on the card, if the cost and blocks are mostly on 40/50 series. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
dheerajc8073 commented 2026-11-29 16:56:48 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by dheerajc8073 on 2026-11-29T16:56:48Z.


Thanks @nick0451 for testing on the RTX 3090!

The original issue (#739) was reported specifically on an RTX 3070 (also 32-lane Ampere) when underwater and in close proximity to boat geometry, where the water light compute shader's tiled accumulation produces black rectangular tile blocks. In distant open-water views like the balcony save, the artifact does not manifest prominently, which matches your observation.

Leaving the opt-in environment flag (VICTORY_WATER_LIGHT=1) ensures players who prefer the illuminated turquoise water in distance views can easily enable it, while protecting 32-lane hosts from the underwater artifact by default.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7259299036 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1926#issuecomment-7259299036). Originally posted by [dheerajc8073](https://github.com/dheerajc8073) on 2026-11-29T16:56:48Z. --- Thanks @nick0451 for testing on the RTX 3090! The original issue (#739) was reported specifically on an RTX 3070 (also 32-lane Ampere) when underwater and in close proximity to boat geometry, where the water light compute shader's tiled accumulation produces black rectangular tile blocks. In distant open-water views like the balcony save, the artifact does not manifest prominently, which matches your observation. Leaving the opt-in environment flag (`VICTORY_WATER_LIGHT=1`) ensures players who prefer the illuminated turquoise water in distance views can easily enable it, while protecting 32-lane hosts from the underwater artifact by default.
nick0451 commented 2026-11-29 16:58:52 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by nick0451 on 2026-11-29T16:58:52Z.


Makes sense, thanks. One thing to weigh alongside: #1935 retranslates exactly these two programs (CS_TransmissionVolumetrics_Tiled and _Tiled_LocalLights, the only 2 of 25,789 shaders it changes; see my comment there) instead of leaving them out. If someone who sees the close-up/underwater blocks on a 30-series card can confirm #1935 removes them, the lit water could stay on by default and this switch would only be needed as a fallback.

🤖 Generated with Claude Code

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7259325736 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1926#issuecomment-7259325736). Originally posted by [nick0451](https://github.com/nick0451) on 2026-11-29T16:58:52Z. --- Makes sense, thanks. One thing to weigh alongside: #1935 retranslates exactly these two programs (`CS_TransmissionVolumetrics_Tiled` and `_Tiled_LocalLights`, the only 2 of 25,789 shaders it changes; see my comment there) instead of leaving them out. If someone who sees the close-up/underwater blocks on a 30-series card can confirm #1935 removes them, the lit water could stay on by default and this switch would only be needed as a fallback. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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!1926
No description provided.