Repository navigation
GPU: the least indirect light where the title's ray-traced probes have none - #116
Open
starnotes-xj wants to merge 1 commit into
Open
starnotes-xj wants to merge 1 commit into
starnotes-xj wants to merge 1 commit into
Conversation
…e none The title's indirect diffuse light comes from probes it fills by tracing rays, which do not run here: the program that resolves them (CS_ScreenProbes_TemporalResolve) leaves whatever its unwritten inputs held, and what the sun does not reach directly is black. Its output is replaced by a constant right after it runs: raised, not added, so the title's own lighting still applies the surfaces' colours and its exposure reads a sane average instead of garbage. Ported from Belobug's VIctory fork (belobug/VIctory-Belobug-AMD, 4f45ab8), whose ambient.rs is the same pass: root constants (level, tint) and a UAV of the R9G9B9E5 light texture, one dispatch per resolve. On this tree the pass is hooked into State::dispatch, and the list's cached heap, root signature and pipeline are invalidated so the next draw sets its own. VICTORY_AMBIENT=<level> sets the light (0.6 by default, 0 none, `off` keeps the title's output). Measured on an RTX 4060 (8 GB): the prologue cell and the first cutscene went from a white, blown-out frame with VICTORY_AMBIENT=0 to an exposed image at 0.6 — dark corners readable, the window no longer the only visible thing. Still black: eyes and other surfaces lit only by the title's reflections (those rays do not run yet).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The title's indirect diffuse light comes from probes filled by tracing rays, which do not run here:
CS_ScreenProbes_TemporalResolveleaves whatever its unwritten inputs held, so anything the sun does not reach directly is black — and in the prologue it is not even black but blown out, because the title's exposure reads that garbage.This replaces the resolve's output with a constant right after it runs (raised, not added), so the title's own lighting still applies the surfaces' colours and its exposure sees a sane average.
Ported from Belobug's AMD fork (
belobug/VIctory-Belobug-AMD, commit 4f45ab8): the same pass — root constants (level, tint) and a UAV of the R9G9B9E5 light texture, one dispatch per resolve. Here it is hooked intoState::dispatch, and the list's cached heap, root signature and pipeline are invalidated so the next draw sets its own.VICTORY_AMBIENT=<level>sets the light (0.6 by default,0none,offkeeps the title's output).Measured (RTX 4060 Laptop, 8 GB, NVIDIA 621.14)
VICTORY_AMBIENT=0: the whole frame washes out to white; only subtitles are readable.Still black after this: eyes, and surfaces lit only by the title's reflections (those rays do not run yet).
Checks
cargo test -p victory-gpu --release: 112 passed, 0 failed (the newambient_pass_buildsneeds a D3D12 device and returns early without one).cargo clippy --release -p victory-gpu: clean.ambient light level=0.6 width=2560 height=1440and the diff in the images above.