GPU: an opt-in constant stands in for one view a named program writes (VICTORY_AMBIENT) #2617

Open
r4tedx wants to merge 4 commits from upstream-pr/2619 into main
r4tedx commented 2026-11-25 16:58:26 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by r4tedx on 2026-11-25T16:58:26Z.


Some outputs depend on inputs the host never fills. Light gathered by rays walks structures that are not built yet, so the program that resolves it leaves black (or whatever its memory held), and every shaded surface that reads it goes dark. This adds a run-time switch that clears one unordered view to a constant after every dispatch of one program the user names.

Opt-in, off by default. Nothing runs while VICTORY_AMBIENT is unset. No title program names or hashes appear in the code: the user names the program by the shader hash the log already prints.

Syntax

VICTORY_AMBIENT=<program>:<view>:<value>, rules separated by ;

  • <program>: the 16-hex-digit shader hash the log prints for the compute program (compute 0123456789abcdef).
  • <view>: the unordered view as the console shader addresses it: root parameter and table offset in dwords, s1+176 or 1+176 (the notation of the diagnostics' table listings). The address comes from the console code, so it holds across translator versions. An n-th-view index would shift as the translator finds more views.
  • <value>: a colour r,g,b[,a] (alpha 1 if left out). A float or normalized view takes it as it is (ClearUnorderedAccessViewFloat). An integer view takes it packed by the texture's format, or as named: rgb9e5=, r11g11b10= (into a 32-bit word) or rgba16f= (into R16G16B16A16_UINT / R32G32_UINT). A raw word is 0x..., mask (all ones) or zero, for an integer view of any width (zero clears float views too).

Example: VICTORY_AMBIENT=0123456789abcdef:s1+176:rgb9e5=0.3,0.294,0.282

(Level 0.3 per @tippythetaidum's measurement against Series X footage in three prison shots, where 0.6 came out 12-16 display-luma steps too bright: https://github.com/Marvisak/VIctory/pull/2619#issuecomment-7175666509. The right level depends on the scene; it is a stand-in, not the title's lighting.)

What it does

  • After every dispatch of the named program, direct (dispatch) or indirect (execute_indirect of kind dispatch), the named view is cleared through the existing UAV clear path, between UAV barriers on the resource.
  • The first dispatch of a named program logs its table views, formats, size and the packed value. A rule naming a view the program does not have logs a warning once. Counts (filled / skipped) are logged every 5 s.
  • The slot sharing it relies on is now its own PR, #2871, as triage asked. This PR is stacked on it: the first two commits here are #2871's, so please merge #2871 first. The stand-in's own commits are the last two. Without #2871, each stand-in clear would take a fresh dynamic slot per dispatch per rule from the capped heap.

Tests

The title was not used in these tests.

  • the_ambient_stand_in_fills_the_named_views_after_the_named_program (WARP): a program writes three views of a title table. After it runs, the two views its rules name hold the R9G9B9E5 word and the RGBA16F colour, the third keeps what the program wrote, and a program no rule names changes nothing.
  • The slot tests (clears_of_one_view_in_a_list_share_a_dynamic_slot, and a_clear_after_a_cut_takes_a_new_slot_and_the_old_one_stays_held) are #2871's.
  • CPU tests in ambient.rs: R9G9B9E5 against a reference encoder (smallest shared exponent whose mantissas fit), small floats against a nearest-code search, rule parsing, and the packing chosen per format.
  • Results at a83bdc1d (on #2871 d3f9b11e, main f3578e38, WARP): cargo clippy -p victory-gpu --all-targets --locked -- -D warnings and the same with --all-features, both clean; VICTORY_D3D12_WARP=1 cargo test -p victory-gpu --features diagnostics --lib --locked: 251 passed, 0 failed, 1 ignored (an existing benchmark). The stacked VICTORY_STAND_IN branch (#2620, 33df0691): 253 passed, 0 failed, 1 ignored.

In game

In our play build (RTX 5070, local title data used for the in-game measurement; only log lines and a description of the picture are reported), with #2311 holding back the BVH walks:

  • With VICTORY_AMBIENT on the screen-probe resolve's R9G9B9E5 output, the prison cell scene was fully lit and textured. Earlier builds without it showed that scene dark, but they also lacked other changes, so this switch's share of the difference is not isolated.
  • VICTORY_STAND_IN filled the four held-back distant-shadow programs' 1280x720 R16_UINT masks: each logged fill=Ok on first use, and the combined fill count for both switches went 11 -> 348 over 2 min, 0 skipped. Whether all-ones is the right "lit" value for those masks still needs an A/B.

(VICTORY_STAND_IN is the follow-up PR, stacked on this one.)

Credits

  • The idea, and R9G9B9E5 held as 32-bit words, come from the Belobug fork (Belobug/VIctory-Belobug-AMD, 0603123 and 4f45ab8, GPL-3.0-or-later). That fork matches its program by name. Here the user names it by hash, so no program is named in the code.
  • The masks and zeros for narrower integer outputs follow ScarlettPort's stand-in encodings (ZigZagBoi1/ScarlettPort, runtime/victory/crates/victory-shader/src/emit/stand_in.rs, GPL-3.0-or-later).

🤖 Generated with Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:issue:6609474554 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2619). Originally posted by [r4tedx](https://github.com/r4tedx) on 2026-11-25T16:58:26Z. --- Some outputs depend on inputs the host never fills. Light gathered by rays walks structures that are not built yet, so the program that resolves it leaves black (or whatever its memory held), and every shaded surface that reads it goes dark. This adds a run-time switch that clears one unordered view to a constant after every dispatch of one program the user names. **Opt-in, off by default.** Nothing runs while `VICTORY_AMBIENT` is unset. No title program names or hashes appear in the code: the user names the program by the shader hash the log already prints. ### Syntax `VICTORY_AMBIENT=<program>:<view>:<value>`, rules separated by `;` - `<program>`: the 16-hex-digit shader hash the log prints for the compute program (`compute 0123456789abcdef`). - `<view>`: the unordered view as the console shader addresses it: root parameter and table offset in dwords, `s1+176` or `1+176` (the notation of the diagnostics' table listings). The address comes from the console code, so it holds across translator versions. An n-th-view index would shift as the translator finds more views. - `<value>`: a colour `r,g,b[,a]` (alpha 1 if left out). A float or normalized view takes it as it is (`ClearUnorderedAccessViewFloat`). An integer view takes it packed by the texture's format, or as named: `rgb9e5=`, `r11g11b10=` (into a 32-bit word) or `rgba16f=` (into `R16G16B16A16_UINT` / `R32G32_UINT`). A raw word is `0x...`, `mask` (all ones) or `zero`, for an integer view of any width (`zero` clears float views too). Example: `VICTORY_AMBIENT=0123456789abcdef:s1+176:rgb9e5=0.3,0.294,0.282` (Level 0.3 per @tippythetaidum's measurement against Series X footage in three prison shots, where 0.6 came out 12-16 display-luma steps too bright: https://github.com/Marvisak/VIctory/pull/2619#issuecomment-7175666509. The right level depends on the scene; it is a stand-in, not the title's lighting.) ### What it does - After every dispatch of the named program, direct (`dispatch`) or indirect (`execute_indirect` of kind dispatch), the named view is cleared through the existing UAV clear path, between UAV barriers on the resource. - The first dispatch of a named program logs its table views, formats, size and the packed value. A rule naming a view the program does not have logs a warning once. Counts (filled / skipped) are logged every 5 s. - The slot sharing it relies on is now its own PR, #2871, as triage asked. This PR is stacked on it: the first two commits here are #2871's, so please merge #2871 first. The stand-in's own commits are the last two. Without #2871, each stand-in clear would take a fresh dynamic slot per dispatch per rule from the capped heap. ### Tests The title was not used in these tests. - `the_ambient_stand_in_fills_the_named_views_after_the_named_program` (WARP): a program writes three views of a title table. After it runs, the two views its rules name hold the R9G9B9E5 word and the RGBA16F colour, the third keeps what the program wrote, and a program no rule names changes nothing. - The slot tests (`clears_of_one_view_in_a_list_share_a_dynamic_slot`, and `a_clear_after_a_cut_takes_a_new_slot_and_the_old_one_stays_held`) are #2871's. - CPU tests in `ambient.rs`: R9G9B9E5 against a reference encoder (smallest shared exponent whose mantissas fit), small floats against a nearest-code search, rule parsing, and the packing chosen per format. - Results at a83bdc1d (on #2871 d3f9b11e, `main` f3578e38, WARP): `cargo clippy -p victory-gpu --all-targets --locked -- -D warnings` and the same with `--all-features`, both clean; `VICTORY_D3D12_WARP=1 cargo test -p victory-gpu --features diagnostics --lib --locked`: 251 passed, 0 failed, 1 ignored (an existing benchmark). The stacked VICTORY_STAND_IN branch (#2620, 33df0691): 253 passed, 0 failed, 1 ignored. ### In game In our play build (RTX 5070, local title data used for the in-game measurement; only log lines and a description of the picture are reported), with #2311 holding back the BVH walks: - With VICTORY_AMBIENT on the screen-probe resolve's R9G9B9E5 output, the prison cell scene was fully lit and textured. Earlier builds without it showed that scene dark, but they also lacked other changes, so this switch's share of the difference is not isolated. - VICTORY_STAND_IN filled the four held-back distant-shadow programs' 1280x720 R16_UINT masks: each logged fill=Ok on first use, and the combined fill count for both switches went 11 -> 348 over 2 min, 0 skipped. Whether all-ones is the right "lit" value for those masks still needs an A/B. (`VICTORY_STAND_IN` is the follow-up PR, stacked on this one.) ### Credits - The idea, and R9G9B9E5 held as 32-bit words, come from the Belobug fork ([Belobug/VIctory-Belobug-AMD](https://github.com/Belobug/VIctory-Belobug-AMD), 0603123 and 4f45ab8, GPL-3.0-or-later). That fork matches its program by name. Here the user names it by hash, so no program is named in the code. - The masks and zeros for narrower integer outputs follow ScarlettPort's stand-in encodings ([ZigZagBoi1/ScarlettPort](https://github.com/ZigZagBoi1/ScarlettPort), `runtime/victory/crates/victory-shader/src/emit/stand_in.rs`, GPL-3.0-or-later). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
DrDarkDK commented 2026-11-25 17:05:22 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DrDarkDK on 2026-11-25T17:04:16Z.


An indirect dispatch can have a valid pipeline and a zero count-buffer value. In that case ExecuteIndirect runs zero commands, but the success path still calls stand_ins and clears the named UAV. That can overwrite an output the title expected to keep. D3D12 command-count semantics

Should the clear run even when the indirect call executes zero commands? If it should only run after shader work, a focused regression test could seed the UAV with a sentinel, issue the indirect call with max = 1 and a zero count buffer, and verify that the sentinel survives.

Static review only.

AI-assisted with Codex.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7168957253 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2619#issuecomment-7168957253). Originally posted by [DrDarkDK](https://github.com/DrDarkDK) on 2026-11-25T17:04:16Z. --- An indirect dispatch can have a valid pipeline and a zero count-buffer value. In that case `ExecuteIndirect` runs zero commands, but the success path still calls `stand_ins` and clears the named UAV. That can overwrite an output the title expected to keep. [D3D12 command-count semantics](https://learn.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12graphicscommandlist-executeindirect#parameters) Should the clear run even when the indirect call executes zero commands? If it should only run after shader work, a focused regression test could seed the UAV with a sentinel, issue the indirect call with `max = 1` and a zero count buffer, and verify that the sentinel survives. Static review only. *AI-assisted with Codex.*
kotekompotek commented 2026-11-25 18:02:53 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-25T17:52:16Z.


Reviewed together with #2620: this is the same new ambient.rs; #2620 is the superset (adds VICTORY_STAND_IN for programs that never run, ~250 more lines of docs + logic). If #2620 lands, this one is subsumed — the docs here are accurate on the spec (per-dispatch UAV clear between barriers, view addressed by console root-param + dword offset so it survives translator changes). Opt-in, off by default. CI green.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7170115509 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2619#issuecomment-7170115509). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-11-25T17:52:16Z. --- Reviewed together with #2620: this is the same new `ambient.rs`; #2620 is the superset (adds `VICTORY_STAND_IN` for programs that never run, ~250 more lines of docs + logic). If #2620 lands, this one is subsumed — the docs here are accurate on the spec (per-dispatch UAV clear between barriers, view addressed by console root-param + dword offset so it survives translator changes). Opt-in, off by default. CI green.
r4tedx commented 2026-11-25 19:06:17 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by r4tedx on 2026-11-25T18:23:45Z.


@DrDarkDK, thanks, good catch. An indirect dispatch with a zero count ran nothing, but the stand-in still cleared the view. Fixed in the new commit on this branch (head 67320f31):

  • With at most zero records, nothing is cleared.
  • With a count buffer, the clear is predicated on the count (D3D12_PREDICATION_OP_EQUAL_ZERO), so a zero count skips it on the GPU. A predicate is a 64-bit value at an 8-byte-aligned offset, while the count is a 32-bit word anywhere, so the count is first copied into the low half of a zeroed 8-byte word the list owns. The copy is recorded just before ExecuteIndirect, at the point where the execution reads the count: after the count's host copy is refreshed and after the argument clamp's UAV barrier. Only the Clear call itself is predicated.
  • With no count buffer, it clears as before.

Regression test on WARP, as you suggested: the_ambient_stand_in_follows_only_indirect_dispatches_that_ran_records. It seeds the view with a sentinel and runs a host ExecuteIndirect with at most one record and a zero count, placed at an unaligned offset with a non-zero word after it. The sentinel survives. A count of one clears it, at most zero records keeps it, and no count clears it.

The same commit fixes a test flake: ambient::filled() now counts per calling thread under test, so stand-in tests running side by side no longer change each other's counts. The run-wide count in the log is unchanged.

clippy, both ways victory-gpu --lib, WARP, --test-threads=1 stand-in tests at --test-threads=4, 5 rounds
this PR, 67320f31 clean 205 passed, 0 failed, 1 ignored 7 of 7 each round
#2620, af1973b2 clean 207 passed, 0 failed, 1 ignored 9 of 9 each round

#2620 (VICTORY_STAND_IN) is rebased on this head and has the same fix for dispatches that don't run.

@kotekompotek, thanks for reviewing both. Yes, #2620 is stacked on this one by design: this PR is the smaller, self-contained VICTORY_AMBIENT part, and #2620 adds only its last commit on top. If the maintainers prefer one PR, merging #2620 takes both.

The title was not used in these tests.

AI-assisted

<!-- greyfinch-sync:Marvisak/VIctory:comment:7170848706 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2619#issuecomment-7170848706). Originally posted by [r4tedx](https://github.com/r4tedx) on 2026-11-25T18:23:45Z. --- @DrDarkDK, thanks, good catch. An indirect dispatch with a zero count ran nothing, but the stand-in still cleared the view. Fixed in the new commit on this branch (head `67320f31`): - With at most zero records, nothing is cleared. - With a count buffer, the clear is predicated on the count (`D3D12_PREDICATION_OP_EQUAL_ZERO`), so a zero count skips it on the GPU. A predicate is a 64-bit value at an 8-byte-aligned offset, while the count is a 32-bit word anywhere, so the count is first copied into the low half of a zeroed 8-byte word the list owns. The copy is recorded just before `ExecuteIndirect`, at the point where the execution reads the count: after the count's host copy is refreshed and after the argument clamp's UAV barrier. Only the Clear call itself is predicated. - With no count buffer, it clears as before. Regression test on WARP, as you suggested: `the_ambient_stand_in_follows_only_indirect_dispatches_that_ran_records`. It seeds the view with a sentinel and runs a host `ExecuteIndirect` with at most one record and a zero count, placed at an unaligned offset with a non-zero word after it. The sentinel survives. A count of one clears it, at most zero records keeps it, and no count clears it. The same commit fixes a test flake: `ambient::filled()` now counts per calling thread under test, so stand-in tests running side by side no longer change each other's counts. The run-wide count in the log is unchanged. | | clippy, both ways | `victory-gpu --lib`, WARP, `--test-threads=1` | stand-in tests at `--test-threads=4`, 5 rounds | |---|---|---|---| | this PR, `67320f31` | clean | 205 passed, 0 failed, 1 ignored | 7 of 7 each round | | #2620, `af1973b2` | clean | 207 passed, 0 failed, 1 ignored | 9 of 9 each round | #2620 (`VICTORY_STAND_IN`) is rebased on this head and has the same fix for dispatches that don't run. @kotekompotek, thanks for reviewing both. Yes, #2620 is stacked on this one by design: this PR is the smaller, self-contained `VICTORY_AMBIENT` part, and #2620 adds only its last commit on top. If the maintainers prefer one PR, merging #2620 takes both. The title was not used in these tests. AI-assisted
Venom2054 commented 2026-11-25 19:06:20 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Venom2054 on 2026-11-25T18:25:45Z.


I tested the two switches separately on an RTX 5070 Ti in the prison-window shot. I used the same local integration of #2619 (11012ead) and #2620 (9d73ed65), executable, initial save, starting caches, input sequence and SDR settings for all three runs. Character textures were present in the material buffer in every run.

Enabled switch Back of head Shirt Sky
Neither 1.33 0.36 220.01
Ambient only (#2619) 32.77 40.02 238.64
Four distant-shadow masks only (#2620) 1.31 0.37 219.84

Values are displayed SDR luma on a 0–255 scale, averaged within each region and then summarized by the median of three camera-matched frames per run. With ambient alone, the shirt lettering and seams became readable. Before lighting, the shirt's median RGB stayed within two code values per channel across all runs.

The captured screen-probe dispatch was direct (320×360×1). The ambient rule filled the 2560×1440 packed screen-probe output. In the shadow-only run, all four held-back passes reported a successful fill on their 1280×720 R16_UINT masks. The last counters were 197 ambient fills and 693 shadow fills respectively, with zero skipped in both runs.

This isolates a visible contribution from ambient in this shot. Filling the four distant-shadow masks with all ones on its own produced no appreciable change on the character here. Mask polarity and interaction with ambient remain open. The ambient result still looks flat, especially around the hair.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7170894581 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2619#issuecomment-7170894581). Originally posted by [Venom2054](https://github.com/Venom2054) on 2026-11-25T18:25:45Z. --- I tested the two switches separately on an RTX 5070 Ti in the prison-window shot. I used the same local integration of #2619 (`11012ead`) and #2620 (`9d73ed65`), executable, initial save, starting caches, input sequence and SDR settings for all three runs. Character textures were present in the material buffer in every run. | Enabled switch | Back of head | Shirt | Sky | | --- | ---: | ---: | ---: | | Neither | 1.33 | 0.36 | 220.01 | | Ambient only (#2619) | 32.77 | 40.02 | 238.64 | | Four distant-shadow masks only (#2620) | 1.31 | 0.37 | 219.84 | Values are displayed SDR luma on a 0–255 scale, averaged within each region and then summarized by the median of three camera-matched frames per run. With ambient alone, the shirt lettering and seams became readable. Before lighting, the shirt's median RGB stayed within two code values per channel across all runs. The captured screen-probe dispatch was direct (320×360×1). The ambient rule filled the 2560×1440 packed screen-probe output. In the shadow-only run, all four held-back passes reported a successful fill on their 1280×720 R16_UINT masks. The last counters were 197 ambient fills and 693 shadow fills respectively, with zero skipped in both runs. This isolates a visible contribution from ambient in this shot. Filling the four distant-shadow masks with all ones on its own produced no appreciable change on the character here. Mask polarity and interaction with ambient remain open. The ambient result still looks flat, especially around the hair.
r4tedx commented 2026-11-25 19:06:21 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by r4tedx on 2026-11-25T18:28:41Z.


@Venom2054, thanks. The three runs on matched frames make this easy to read: ambient alone takes the back of the head from 1.33 to 32.77 and the shirt from 0.36 to 40.02, while the four distant-shadow masks alone change nothing measurable.

Two notes on the heads you tested:

  • 11012ead / 9d73ed65 predate the zero-count fix (DrDarkDK's report above). The current heads are 67320f31 (this PR) and af1973b2 (#2620). The fix only matters for indirect dispatches whose count is zero, so your runs should come out the same; your screen-probe dispatch was direct anyway.
  • "Flat" is what the ambient stand-in gives by design. It writes one constant into the packed screen-probe output in place of the probe GI the host doesn't produce yet: no direction, no occlusion. Detail around the hair would need the real probe and irradiance-cache passes, which are still refused on a 32-lane host.

On polarity: mask fills all ones. If those R16_UINT masks mean "1 = in shadow" in this title, all ones would keep the character shadowed, which looks the same as before. Two cheap checks on the same shot:

  1. the same four rules with zero in place of mask;
  2. ambient plus the masks together, once with mask and once with zero.

If zero brightens the character, the masks are "1 = shadowed". If neither moves it, those four distant passes aren't what darkens a close-up. The near cascades (cascadeshadows_rendering CS_ShadowRenderTiledCascades*) don't translate on a 32-lane host on main 940d32f (see my note on #1962), so a stand-in for one of them would need its own rule.

AI-assisted

<!-- greyfinch-sync:Marvisak/VIctory:comment:7170961074 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2619#issuecomment-7170961074). Originally posted by [r4tedx](https://github.com/r4tedx) on 2026-11-25T18:28:41Z. --- @Venom2054, thanks. The three runs on matched frames make this easy to read: ambient alone takes the back of the head from 1.33 to 32.77 and the shirt from 0.36 to 40.02, while the four distant-shadow masks alone change nothing measurable. Two notes on the heads you tested: - `11012ead` / `9d73ed65` predate the zero-count fix (DrDarkDK's report above). The current heads are `67320f31` (this PR) and `af1973b2` (#2620). The fix only matters for indirect dispatches whose count is zero, so your runs should come out the same; your screen-probe dispatch was direct anyway. - "Flat" is what the ambient stand-in gives by design. It writes one constant into the packed screen-probe output in place of the probe GI the host doesn't produce yet: no direction, no occlusion. Detail around the hair would need the real probe and irradiance-cache passes, which are still refused on a 32-lane host. On polarity: `mask` fills all ones. If those R16_UINT masks mean "1 = in shadow" in this title, all ones would keep the character shadowed, which looks the same as before. Two cheap checks on the same shot: 1. the same four rules with `zero` in place of `mask`; 2. ambient plus the masks together, once with `mask` and once with `zero`. If `zero` brightens the character, the masks are "1 = shadowed". If neither moves it, those four distant passes aren't what darkens a close-up. The near cascades (`cascadeshadows_rendering` CS_ShadowRenderTiledCascades*) don't translate on a 32-lane host on `main` 940d32f (see my note on #1962), so a stand-in for one of them would need its own rule. AI-assisted
Venom2054 commented 2026-11-25 19:06:41 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Venom2054 on 2026-11-25T18:56:40Z.


I ran the three follow-ups from your reply on the same RTX 5070 Ti using the same executable, initial state and camera-matching method as the earlier report. One run per setting, three matched window frames per run. The values are median displayed luma on the same 0–255 scale.

Distant-shadow setting Ambient Back of head Shirt Sky
Four masks set to zero Off 2.17 0.46 219.26
Four masks set to all ones On 32.89 39.92 238.81
Four masks set to zero On 32.94 41.61 236.76

For reference, ambient alone was 32.77 / 40.02 / 238.64. Each of the four 1280×720 R16_UINT outputs accepted the requested fill in each run. The last combined counters showed 928 fills for ambient + ones and 1,002 for ambient + zeros, with zero skipped in either run.

Changing the masks to zero without ambient left the character a silhouette. With ambient on, the lettering and collar stayed visible with either mask value. I could see individual strands at the right edge of the head in both the ambient-only and ambient-plus-ones frames, but no additional rim lighting or ponytail detail from the distant masks. This closes the interaction check for this close-up on these revisions. The small differences do not establish mask polarity elsewhere.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7171613552 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2619#issuecomment-7171613552). Originally posted by [Venom2054](https://github.com/Venom2054) on 2026-11-25T18:56:40Z. --- I ran the three follow-ups from your reply on the same RTX 5070 Ti using the same executable, initial state and camera-matching method as the earlier report. One run per setting, three matched window frames per run. The values are median displayed luma on the same 0–255 scale. | Distant-shadow setting | Ambient | Back of head | Shirt | Sky | | --- | --- | ---: | ---: | ---: | | Four masks set to zero | Off | 2.17 | 0.46 | 219.26 | | Four masks set to all ones | On | 32.89 | 39.92 | 238.81 | | Four masks set to zero | On | 32.94 | 41.61 | 236.76 | For reference, ambient alone was 32.77 / 40.02 / 238.64. Each of the four 1280×720 R16_UINT outputs accepted the requested fill in each run. The last combined counters showed 928 fills for ambient + ones and 1,002 for ambient + zeros, with zero skipped in either run. Changing the masks to zero without ambient left the character a silhouette. With ambient on, the lettering and collar stayed visible with either mask value. I could see individual strands at the right edge of the head in both the ambient-only and ambient-plus-ones frames, but no additional rim lighting or ponytail detail from the distant masks. This closes the interaction check for this close-up on these revisions. The small differences do not establish mask polarity elsewhere.
tippythetaidum commented 2026-11-25 22:04:38 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by tippythetaidum on 2026-11-25T21:53:18Z.


Calibration data for the example value, measured against Series X footage instead of by eye.

On victory-fork (its own version of this switch, VICTORY_AMBIENT=<level>, written as level × (1.0, 0.98, 0.94) into the same screen-probe resolve output), level 0.6 is exactly this PR's example rgb9e5=0.6,0.588,0.564. I compared two 600 s runs on an RTX 5080 (Series X profile, ray-tracing structure builder off, otherwise the same build and settings) shot by shot with console footage of the same scenes. The numbers are the mean display luma of the whole frame (0-255, Rec. 709 weights, 240×135 downscale); the footage is a YouTube capture of the console:

shot Series X level 0.6 level 0.3
cell, Yolanda at the table (gameplay) 90 106 94
corridor with the guard (gameplay) 86 100 88
Lucia at the cell window (cutscene) 85 97 81

So 0.6 sits 12-16 above the console in these shots and 0.3 within 2-4. The rooms also lost their flat look at 0.3: ceilings and corners darker, closer to the footage. It's still one constant everywhere, so it can't give the console's falloff. The common room, about 52 in the footage, measured 86 at 0.6; I don't have a 0.3 shot of it yet. Most of the console's light there comes from the windows, which a constant can't follow.

Caveats: one machine, one capture of the footage (YouTube's encode and levels sit between the console and these numbers), and the shots are matched by camera, not frame-exact. If the example is meant as a sensible default, 0.3,0.294,0.282 measured closer here.

AI-assisted (Claude Code, Claude Opus 5.5): runs, captures, the measurement and this text. Numbers only; no frames attached.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7175666509 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2619#issuecomment-7175666509). Originally posted by [tippythetaidum](https://github.com/tippythetaidum) on 2026-11-25T21:53:18Z. --- Calibration data for the example value, measured against Series X footage instead of by eye. On victory-fork (its own version of this switch, `VICTORY_AMBIENT=<level>`, written as `level × (1.0, 0.98, 0.94)` into the same screen-probe resolve output), level 0.6 is exactly this PR's example `rgb9e5=0.6,0.588,0.564`. I compared two 600 s runs on an RTX 5080 (Series X profile, ray-tracing structure builder off, otherwise the same build and settings) shot by shot with console footage of the same scenes. The numbers are the mean display luma of the whole frame (0-255, Rec. 709 weights, 240×135 downscale); the footage is a YouTube capture of the console: | shot | Series X | level 0.6 | level 0.3 | |---|---:|---:|---:| | cell, Yolanda at the table (gameplay) | 90 | 106 | 94 | | corridor with the guard (gameplay) | 86 | 100 | 88 | | Lucia at the cell window (cutscene) | 85 | 97 | 81 | So 0.6 sits 12-16 above the console in these shots and 0.3 within 2-4. The rooms also lost their flat look at 0.3: ceilings and corners darker, closer to the footage. It's still one constant everywhere, so it can't give the console's falloff. The common room, about 52 in the footage, measured 86 at 0.6; I don't have a 0.3 shot of it yet. Most of the console's light there comes from the windows, which a constant can't follow. Caveats: one machine, one capture of the footage (YouTube's encode and levels sit between the console and these numbers), and the shots are matched by camera, not frame-exact. If the example is meant as a sensible default, `0.3,0.294,0.282` measured closer here. AI-assisted (Claude Code, Claude Opus 5.5): runs, captures, the measurement and this text. Numbers only; no frames attached.
r4tedx commented 2026-11-25 22:04:38 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by r4tedx on 2026-11-25T21:55:14Z.


@tippythetaidum, thanks for measuring it against console footage. Three matched shots, with 0.6 at 12-16 over and 0.3 within 2-4, is enough to change the example. The PR description now suggests rgb9e5=0.3,0.294,0.282 and links your comment. The values in the tests stay as they are, because they check the parser, not a level.

Your caveat on the common room (about 52 on the console, 86 at 0.6) fits what the switch is: one constant for every pixel in place of probe lighting, so it can't match both a lit cell and a dim room. The real fix is getting the probe passes themselves to run, and the stand-in only bridges that gap.

AI-assisted

<!-- greyfinch-sync:Marvisak/VIctory:comment:7175708172 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2619#issuecomment-7175708172). Originally posted by [r4tedx](https://github.com/r4tedx) on 2026-11-25T21:55:14Z. --- @tippythetaidum, thanks for measuring it against console footage. Three matched shots, with 0.6 at 12-16 over and 0.3 within 2-4, is enough to change the example. The PR description now suggests `rgb9e5=0.3,0.294,0.282` and links your comment. The values in the tests stay as they are, because they check the parser, not a level. Your caveat on the common room (about 52 on the console, 86 at 0.6) fits what the switch is: one constant for every pixel in place of probe lighting, so it can't match both a lit cell and a dim room. The real fix is getting the probe passes themselves to run, and the stand-in only bridges that gap. AI-assisted
Marvisak commented 2026-11-25 23:06:08 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T22:18:31Z.


Automated triage for the maintainers.

Needs the maintainer's decision. The switch is opt-in, names no title program in code, and handles the zero-count indirect case raised in review (predicated clear).

On your reply: thanks for splitting the slot sharing out into #2871. That resolves the second point of the earlier triage. This branch still carries #2871's two commits (e7169ee, d3f9b11) under the stand-in's own (8d9a25b, a83bdc1), so it can only land after #2871. The scope question is still open and isn't something triage can settle. VICTORY_AMBIENT (crates/victory-gpu/src/ambient.rs, plus the dispatch hooks in draw.rs) overwrites a program's output with a hand-tuned constant in place of lighting the host doesn't produce. Whether VIctory wants user-configured per-program stand-ins of this kind is up to the maintainer. CI check is passing.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7176199762 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2619#issuecomment-7176199762). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T22:18:31Z. --- <!-- victory-triage v1 head=a83bdc1d3d006943791372d7a3c393a47efba925 verdict=needs-work at=2026-11-26T00:24:25Z --> Automated triage for the maintainers. Needs the maintainer's decision. The switch is opt-in, names no title program in code, and handles the zero-count indirect case raised in review (predicated clear). On your reply: thanks for splitting the slot sharing out into #2871. That resolves the second point of the earlier triage. This branch still carries #2871's two commits (`e7169ee`, `d3f9b11`) under the stand-in's own (`8d9a25b`, `a83bdc1`), so it can only land after #2871. The scope question is still open and isn't something triage can settle. `VICTORY_AMBIENT` (`crates/victory-gpu/src/ambient.rs`, plus the dispatch hooks in `draw.rs`) overwrites a program's output with a hand-tuned constant in place of lighting the host doesn't produce. Whether VIctory wants user-configured per-program stand-ins of this kind is up to the maintainer. CI `check` is passing. --- _Generated by [Claude Code](https://claude.ai/code)_
r4tedx commented 2026-11-26 00:03:32 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by r4tedx on 2026-11-25T23:28:36Z.


Following triage: the slot sharing (the old second commit, 11012ead) is now its own PR, #2871. It was adapted to main there, and a cut test was added in review. This PR is rebased on top of it, so its head a83bdc1d is #2871's two commits plus the stand-in's two (8d9a25b3, a83bdc1d). Please merge #2871 first. The stand-in code itself is unchanged; the only difference from the previous head is the rebase and #2871's added test.

WARP at a83bdc1d (on main f3578e38): clippy -D warnings clean with and without --all-features; victory-gpu lib 251 passed, 0 failed, 1 ignored. The description is updated to match. The title was not used in these tests.

AI-assisted

<!-- greyfinch-sync:Marvisak/VIctory:comment:7177612176 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2619#issuecomment-7177612176). Originally posted by [r4tedx](https://github.com/r4tedx) on 2026-11-25T23:28:36Z. --- Following triage: the slot sharing (the old second commit, 11012ead) is now its own PR, #2871. It was adapted to `main` there, and a cut test was added in review. This PR is rebased on top of it, so its head a83bdc1d is #2871's two commits plus the stand-in's two (8d9a25b3, a83bdc1d). Please merge #2871 first. The stand-in code itself is unchanged; the only difference from the previous head is the rebase and #2871's added test. WARP at a83bdc1d (on `main` f3578e38): clippy `-D warnings` clean with and without `--all-features`; victory-gpu lib 251 passed, 0 failed, 1 ignored. The description is updated to match. The title was not used in these tests. AI-assisted
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/2619:upstream-pr/2619'
git switch 'upstream-pr/2619'

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/2619'
git switch 'upstream-pr/2619'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2619'
git switch 'upstream-pr/2619'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2619'
git switch 'main'
git merge --squash 'upstream-pr/2619'
git switch 'main'
git merge --ff-only 'upstream-pr/2619'
git switch 'main'
git merge 'upstream-pr/2619'
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
Marvisak/VIctory!2617
No description provided.