Repository navigation
Conversation
…AMBIENT=<level>, off by default) Ported from Belobug/VIctory-Belobug-AMD (ambient.rs, GPL-3.0): right after the program that resolves the title's indirect diffuse light, its output is replaced by a constant, shaded from the scene's depth. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Tested on Linux/Proton (RTX 5070 Ti, driver 620.73.04, GE-Proton11-14, main Without the change: With the change: compile with DXC first, the same fallback used for the indirect clamp on Wine (#20). The pass then runs ( let code = crate::indirect::dxc_compile_for(SOURCE, "main", "cs_6_0")
.or_else(|_| crate::host::compile(SOURCE, s!("main"), s!("cs_5_1")))
.inspect_err(|e| tracing::warn!(error = %e, "ambient light: shader not compiled"))?;This replaces the Result with
AI-assisted: Claude Code ran the builds and tests on my machine, read the logs and wrote this comment; posted at my request. |
As the indirect clamp does, so a fallback added there (DXC under Wine, fxceless#20) covers it too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks, that's very useful, especially the square blocks on characters going away and the face being lit. I hadn't been able to check either here. On Wine:
AI use: Claude Code (Claude Opus 5.5) made the change, ran the test on my machine and wrote this reply. |
|
Thanks for taking it. A correction to my "second option": routing through The helper falls back to DXC only when Two ways that would work:
Without either, the pass stays off under Wine. AI-assisted: Claude Code ran the builds and tests on my machine, read the logs and wrote this comment; posted at my request. |
Wine's D3DCompile succeeds but leaves the [RootSignature] part out of the bytecode, so CreateRootSignature on it failed (0x80004005) and the pass stayed off. The same signature is now built with D3D12SerializeRootSignature, which needs no compiler support. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
You're right, thanks for the correction: the fallback only runs on an error, and here there isn't one. A third way, which needs neither DXC nor #20: the pass no longer takes its root signature from the compiled shader. It builds the same one (8 root constants at On Windows (RTX 4070), AI use: Claude Code (Claude Opus 5.5) made the change, ran the test on my machine and wrote this reply. |
|
Confirmed: The tree is the same as before, with this PR's current So the PR as it stands works on Linux/Proton without #20. I've dropped my local patch in favour of it. AI-assisted: Claude Code ran the builds and tests on my machine, read the logs and wrote this comment; posted at my request. |
|
One more observation with the pass on (same tree,
So the probe resolve this pass replaces accounts for the blocks in shadow, but something else still writes them where surfaces face the light. Possibly the specular or reflection side of the probes, which the pass leaves alone. I haven't identified the program. Just a data point in case the pass could cover a second output. AI-assisted: Claude Code ran the builds and tests on my machine, read the logs and wrote this comment; posted at my request. |
|
On the blocks toward the window: I think they come from a missing shadow program, not from the probes. On the RTX 4070 they follow one compute program, Without #799, it fails to translate here with Same view (the player in front of the window, this PR at
So in our runs, the blocks are where lit surfaces miss their shadow tiles. #799 brings this program up without its loose-LDS fallback (I posted that on #799 yesterday). If your log shows Caveat: one run per configuration, and others on #799 have seen lighting vary from run to run. Still, the blocks were present every time this program was missing and absent every time it ran. AI use: the runs were done on my machine. Claude Code (Claude Opus 5.5) ran them, compared the captures and logs and wrote this reply. |
What
The title's indirect diffuse light comes from probes that it fills by tracing rays. Those don't run here yet, so whatever the sun doesn't reach directly comes out black: in the first room, the whole half away from the window. This adds an opt-in stand-in for that light, ported from Belobug/VIctory-Belobug-AMD (GPL-3.0,
ambient.rs):CS_ScreenProbes_TemporalResolve*, found by name in the container), a small compute pass of the layer's own replaces that program's output (R9G9B9E5 as 32-bit integers) with a constant level.bindto set again (host_pipeline,host_roots,host_heapscleared, as after the clamp passes).Off by default.
VICTORY_AMBIENT=<level>turns it on; 0.6 looked balanced here.VICTORY_AMBIENT_TINT=r,g,bsets the colour andVICTORY_AMBIENT_SHADEthe depth shading, both as in the original. It's a stopgap: once the probes are filled by real rays, it should stay off.Changes
crates/victory-gpu/src/ambient.rs(new): the pass, compiled withD3DCompile(theFxcfeature is already enabled), and a unit test that builds it on the host.pipeline.rs:Shader::resolves_light, set when the container names the resolve program.draw.rs: after a compute dispatch,ambient()finds the light UAV and depth SRV in the program's tables and records the pass.lib.rs: the module.Testing
RTX 4070 12 GB (32-lane waves), driver 32.0.16.2124, Ryzen 9 7900, 32 GB, Windows 11 Pro 26300, Series X profile. Diagnostics build, prewarmed cache, from the checkpoint to the first room, then idle.
VICTORY_INDIRECT_WINDOW=1 VICTORY_LEVELS_ON_DEMAND=1 VICTORY_JOIN_PARTS=1 VICTORY_BACK_OWN_VIEW=1 VICTORY_COPY_PLAIN=1 VICTORY_LATE_WAIT=3 VICTORY_CAPTURE_WORLD_EVERY=64. Means once the frame rate had settled.3973179, off3973179,VICTORY_AMBIENT=0.6d510ee4,VICTORY_AMBIENT=0.6d510ee4,VICTORY_AMBIENT=0.6+VICTORY_INDIRECT_GATHER=1 VICTORY_CARD_REHASH_RUNS=1cargo test -p victory-gpu: 193 passed, 0 failed, includingambient::tests::ambient_pass_buildson the 4070.Not tested: other scenes and hours of the day (the original notes that one level doesn't suit every hour), AMD and Intel cards, release builds.
Credit: the pass and its tuning are Belobug's work; this PR only wires it into this tree.
AI use: Claude Code (Claude Opus 5.5) ported the code, ran the tests on my machine and wrote this description.
🤖 Generated with Claude Code