feat(vk): NVIDIA DLAA before the game's bloom and tone map #1652

Merged
HumanBean merged 1 commit from pmwork-personal/Longshot:feat/dlss-pre-bloom into main 2026-11-18 21:14:04 +00:00
Member

Type: feat · Risk: medium · Tested on: Windows 11, RTX 5090 · Needs: Windows, NVIDIA RTX, on screen in motion

TL;DR

With NVIDIA DLAA, DLSS ran after the game's bloom and tone map, on a picture already squeezed into 0–1. This PR runs
DLAA earlier, on the scene's full-range colour before the bloom and the tone map, so the bloom is made from an
anti-aliased scene and bright highlights are not clipped before DLSS sees them. It is on by default with DLAA, and
RX_VK_DLSS_PRE_BLOOM=0 gives the old order. In the Market, still pictures are a little sharper; the measured shimmer
on static stone edges is mixed: the bright, static temple stone changes about 20% more from frame to frame, while darker, textured areas are up to a third steadier.

Breakdown

  • Who it helps: players on an NVIDIA RTX card with the Upscaler on DLAA.
  • What was wrong: DLAA took the game's final, tone-mapped picture, so the bloom was made from the jittered, aliased
    scene and every highlight was clipped at white before DLSS saw it.
  • What changes: with DLAA, DLSS anti-aliases the scene's linear colour right before the bloom; the game's bloom, tone
    map and the passes after them then use that picture, and the game's upscale only copies.
  • What does not change: DLSS's upscaling modes (Quality to Ultra Performance), FSR 3.1, FSR 4, XeSS, the HUD, the
    frame generation inputs, and everything with RX_VK_DLSS_PRE_BLOOM=0 or the parallel replay (RX_VK_PARALLEL 2+).
  • How it was checked: a new game-free test; the game off-screen at the Market spot, main and this PR in turn, 2 runs
    each: stills and 24-frame bursts with the camera still; the log shows every frame drawn before the bloom.
  • What is still open: an on-screen check in motion at bloom-heavy spots (night, water, Navi in the dark); native
    HDR and PsychoV35 with this order.
  • Risk: medium: a new place in the frame for DLSS; a frame that does not match falls back to the old place, and
    RX_VK_DLSS_PRE_BLOOM=0 turns it off.

Why

The game draws its scene in linear light, adds bloom, tone maps, and then runs its own upscale network. Longshot
replaces that network with DLSS, so DLSS got the tone-mapped picture: the bloom had already been built from the
jittered, aliased scene, and the highlights were clipped. Running DLAA before the bloom gives the post passes a stable,
anti-aliased scene and lets DLSS see the full range of the light, as DLSS is meant to be used.

What changed

DLAA now runs at the first pass that reads the scene after the frame's last draw into it, which in a gameplay frame is
the bloom's first pass. That place is known only at the end of a frame (the game copies the scene for refraction and
draws more into it before the bloom), so each frame learns it for the next, by program and by its place among the
passes that read the scene. A frame without that place (the first frame in an area, a menu) runs DLAA at the network
as before and teaches the next frame.

  • gpu/vk/pre_bloom.h (new): the frame's list of passes and the learning rule, pure and tested.
  • gpu/vk/vk_temporal.cpp: temporal_pre_bloom() (the place, the checks, DLAA on the scene and its picture written
    back); the engine's evaluation moved from temporal_upscale() into draw_engine(), used from both places, with a
    prep_lin input pass (linear, not squared); temporal_upscale() learns the next place and copies the network's
    input where DLAA ran before the bloom (stretch_record(), split out of stretch()); the status line counts the
    frames drawn before the bloom.
  • gpu/vk/vk_draw.cpp: each draw calls temporal_pre_bloom() after its descriptors and before its pass.
  • gpu/vk/vk_dlss.cpp: the DLSS feature is made for HDR colour (with NGX's auto exposure) when this order is on.
  • gpu/vk/switches.def, docs/development.md: RX_VK_DLSS_PRE_BLOOM.
  • Tests: tests/test_dlss_pre_bloom.py/.cpp (new); six checks that read the moved code follow it.

Measurements

Verdict: mixed. Stills are slightly sharper, and the darker, textured areas are steadier (bench and wall -33%, stone path -9%, distant haze -8%), but the bright static stone in the sun changes about 20% more from frame to frame, with 2.4 to 3.2 times as many pixels changing by more than 8 of 255. Every frame of the PR runs drew DLAA before the bloom. Not measured yet: on screen, in motion, in scenes with strong bloom.

Hardware: Windows 11 Pro build 26300; NVIDIA GeForce RTX 5090, driver 621.24; AMD Ryzen 7 9800X3D, 64 GB
Scene: Hyrule Market (child), day, the tester's saved spot, camera still; 5120x2160, NVIDIA DLAA, frame generation off,
the tester's own settings otherwise
Method: the game off-screen (HOS_HEADLESS=1) from the control bridge (scripts/longshot_ctl.py): 3 full-size stills,
then 24 consecutive full-size frames (RX_VK_SHOT_GO), main and this PR in turn, 2 runs each; per region, the mean
absolute frame-to-frame change of luma (0–255) over the 23 steps; the median of the 2 runs
How to reproduce: scripts/longshot_ctl.py launch <runtime> --env HOS_HEADLESS=1 --env RX_VK_FRAMEGEN=0 --env RX_VK_SHOT_W=5120 --env RX_VK_SHOT_H=2160 --env RX_VK_SHOTS=<dir> --env RX_VK_SHOT_GO=<file> --env RX_VK_SHOT_EVERY=1000000, press A until in play at the saved spot, wait 12 s, create the go file until 24 frames are saved; per region, the mean over the pixels of |luma(n+1) - luma(n)|
Builds: 4f71ed0c is this PR's change on c507b98c, the shared base's commit (both built from source, the same base); the PR's head on main differs from it only in a comment and one log line's text
Why the numbers hold on main @ 39da4155: main and this change were measured on the same base, so the comparison is like for like; the change is the same after the rebase (git range-diff: equal); and none of main's renderer commits since c507b98c (quads with 8-bit indices, the depth margin of blended draws, pipeline warming and temporary pipelines, memory pressure) changes the scene's passes, the bloom or the DLSS chain measured here

Before: main @ c507b98c After: this PR @ 4f71ed0c
Frame-to-frame change, temple stairs and pillars (bright stone) 0.723 (0.715, 0.731) 0.883 (0.859, 0.907), +22%
Frame-to-frame change, temple facade (bright stone) 0.675 (0.663, 0.687) 0.803 (0.774, 0.832), +19%
Pixels changing by more than 8, stairs / facade 0.27% / 0.23% 0.67% / 0.72%
Frame-to-frame change, castle and far trees (haze) 1.077 (1.127, 1.027) 0.989 (1.020, 0.957), -8%
Frame-to-frame change, stone path (centre) 2.490 (2.511, 2.468) 2.266 (2.319, 2.212), -9%
Frame-to-frame change, bench and wall 1.221 (1.090, 1.352) 0.823 (0.837, 0.809), -33%
Frames drawn by DLAA / of them before the bloom (log status, 600 frames) 600 / 0 600 / 600 (both runs)
main, r4-main-1:  vk: status: 600 frames, ...; NVIDIA DLAA: 600 frames drawn, 1 made, jitter -0.000 -0.167 px, ...
PR,   r4-pre-1:   vk: status: 600 frames, ...; NVIDIA DLAA: 600 frames drawn (600 before the bloom), 1 made, jitter -0.000 -0.167 px, ...
PR,   r4-pre-1:   vk: NVIDIA DLAA: the bloom's first pass is program ab3681946f93594a, the scene's reader 6 of 6: DLAA runs before it
                  vk: NVIDIA DLAA draws before the game's bloom and tone map: 5120x2160, at program ab3681946f93594a
                  vk: NVIDIA DLAA ran before the bloom: network 9dc98871eb7fc101 left out, its input copied (5120x2160)
                  vk: NVIDIA DLAA: the bloom's first pass is program 95937683d9f74e95, the scene's reader 5 of 6: DLAA runs before it
(the first frame learns the tone map's pass, the next learning moves to the bloom's first pass and stays there; the PR's
 head words that log line as "the first pass to read the scene after its last draw is program ...")

Flags and settings

Adds RX_VK_DLSS_PRE_BLOOM.

Flag What it is Before this PR After this PR Effect Helps / doesn't help / untested Recommendation
RX_VK_DLSS_PRE_BLOOM where DLAA runs (none: after the bloom and tone map) unset = before the bloom with DLAA; =0 after, as before DLAA on the linear scene before the bloom sharper stills in the Market; steadier dark, textured areas; about 20% more frame-to-frame change on bright static stone; bloom-heavy scenes untested on with DLAA (this PR's default); =0 for an A/B or if the bright-stone shimmer shows in play
RX_VK_PARALLEL the parallel replay (not changed, only read here) 2 and more: threads record a frame's passes the same with 2 and more, DLAA stays after the bloom (the passes are recorded out of order) untested with this PR as before

Testing

Tested: Windows 11, RTX 5090, driver 621.24: the game off-screen at the Market spot, main and this PR in turn, 2 runs
each (stills and 24-frame bursts); the log of every PR run says 600 frames drawn (600 before the bloom) and names the
bloom's program; RX_VK_DLSS_PRE_BLOOM=0 gives main's route (checked on the earlier base). tests/test_dlss_pre_bloom.py
passes; tests/run_all.py --changed: 163 pass, 16 fail, 6 skipped; the same 16 fail on main @ 39da4155 on this PC (among them test_switch_table, test_upscaler_rows, test_dlss_feature_size, test_recorder_sync, test_vk_occlusion_queries); tests/test_tested_configurations.py fails one Windows line-end case on main too.

Not tested: a Linux build (standard C++ in the renderer, no OS calls; the Test Farm builds it); on screen in motion; native HDR output and PsychoV35 (written for their RGBA16F scene, not run); areas
other than the Market (a frame whose passes differ falls back to the old place); DLSS frame generation on screen.

Must be tested:

  • Windows, NVIDIA RTX, by hand: DLAA, walk through Kokiri Forest at night, the water at Lake Hylia and a dark room with
    Navi, with and without RX_VK_DLSS_PRE_BLOOM=0, expecting no new shimmer, halo or brightness change, and steadier
    bloom on small bright points.
  • Windows, NVIDIA RTX, native HDR on, by hand: the same spots with and without RX_VK_DLSS_PRE_BLOOM=0, expecting the same brightness and highlights as main (look at the sky, the sun on water and Navi's glow).

Risks

What could break: NVIDIA DLAA only: a scene whose passes differ from the Market's could run DLAA at the wrong place
(the learning only takes a pass after the last scene draw, and a late scene draw sends the next frame back to the old
place); DLSS's own auto exposure may make static edges change more from frame to frame.

Turning it off: RX_VK_DLSS_PRE_BLOOM=0, or revert the commit.

Compatibility: Nothing changes: no save, options file, cache or ABI change.

Checklist

Everyone

  • One topic.
  • The title is a Conventional Commit (type(scope): description) of the status line's type.
  • Why gives the reason plainly and links the issues that fit (the tracker searched).
  • Tested on my own PC where it runs (in the game, for a change the game runs), as Testing's Tested says; what
    can't be run by hand is in Testing's Not testable by hand, with why.
  • Measurements has a verdict, or one line saying why there is nothing to measure.
  • Nothing gets worse that I know of: any cost (speed, latency, memory, a setup that worked before) is measured and
    in Risks.
  • Testing names what was tested, what wasn't, and what must still be tested, where and how.
  • Rebased on current main.
  • python -I -B tests/run_all.py passes (any failure that also fails on main is named).
  • No game files, dumps, build output or generated files.
  • third_party/ untouched (a new folder with a PROVENANCE.md instead).
  • The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled.

When it applies

  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.
  • Numbers from the same PC, scene and settings, at least 2 interleaved runs each, the median reported.
  • Switches documented (docs/development.md; the README for a menu row) and shipped at their recommended value.
  • Screenshots of the same spot, captioned like the Measurements columns, for a change that shows on screen.
  • A file in docs/tested/ for each new measured run (format in docs/tested-configurations.md).
  • A game-free test added for the fix, failing on main and passing here.
  • A check under tests/ that reads changed source updated in this PR, not weakened.
  • Docs updated.

Co-Authored-By: Claude Opus 5.5 [email protected]

🤖 Generated with Claude Code

**Type:** feat · **Risk:** medium · **Tested on:** Windows 11, RTX 5090 · **Needs:** Windows, NVIDIA RTX, on screen in motion ## TL;DR With NVIDIA DLAA, DLSS ran after the game's bloom and tone map, on a picture already squeezed into 0–1. This PR runs DLAA earlier, on the scene's full-range colour before the bloom and the tone map, so the bloom is made from an anti-aliased scene and bright highlights are not clipped before DLSS sees them. It is on by default with DLAA, and `RX_VK_DLSS_PRE_BLOOM=0` gives the old order. In the Market, still pictures are a little sharper; the measured shimmer on static stone edges is mixed: the bright, static temple stone changes about 20% more from frame to frame, while darker, textured areas are up to a third steadier. ## Breakdown - **Who it helps:** players on an NVIDIA RTX card with the Upscaler on DLAA. - **What was wrong:** DLAA took the game's final, tone-mapped picture, so the bloom was made from the jittered, aliased scene and every highlight was clipped at white before DLSS saw it. - **What changes:** with DLAA, DLSS anti-aliases the scene's linear colour right before the bloom; the game's bloom, tone map and the passes after them then use that picture, and the game's upscale only copies. - **What does not change:** DLSS's upscaling modes (Quality to Ultra Performance), FSR 3.1, FSR 4, XeSS, the HUD, the frame generation inputs, and everything with `RX_VK_DLSS_PRE_BLOOM=0` or the parallel replay (`RX_VK_PARALLEL` 2+). - **How it was checked:** a new game-free test; the game off-screen at the Market spot, main and this PR in turn, 2 runs each: stills and 24-frame bursts with the camera still; the log shows every frame drawn before the bloom. - **What is still open:** an on-screen check in motion at bloom-heavy spots (night, water, Navi in the dark); native HDR and PsychoV35 with this order. - **Risk:** medium: a new place in the frame for DLSS; a frame that does not match falls back to the old place, and `RX_VK_DLSS_PRE_BLOOM=0` turns it off. ## Why The game draws its scene in linear light, adds bloom, tone maps, and then runs its own upscale network. Longshot replaces that network with DLSS, so DLSS got the tone-mapped picture: the bloom had already been built from the jittered, aliased scene, and the highlights were clipped. Running DLAA before the bloom gives the post passes a stable, anti-aliased scene and lets DLSS see the full range of the light, as DLSS is meant to be used. ## What changed DLAA now runs at the first pass that reads the scene after the frame's last draw into it, which in a gameplay frame is the bloom's first pass. That place is known only at the end of a frame (the game copies the scene for refraction and draws more into it before the bloom), so each frame learns it for the next, by program and by its place among the passes that read the scene. A frame without that place (the first frame in an area, a menu) runs DLAA at the network as before and teaches the next frame. - `gpu/vk/pre_bloom.h` (new): the frame's list of passes and the learning rule, pure and tested. - `gpu/vk/vk_temporal.cpp`: `temporal_pre_bloom()` (the place, the checks, DLAA on the scene and its picture written back); the engine's evaluation moved from `temporal_upscale()` into `draw_engine()`, used from both places, with a `prep_lin` input pass (linear, not squared); `temporal_upscale()` learns the next place and copies the network's input where DLAA ran before the bloom (`stretch_record()`, split out of `stretch()`); the status line counts the frames drawn before the bloom. - `gpu/vk/vk_draw.cpp`: each draw calls `temporal_pre_bloom()` after its descriptors and before its pass. - `gpu/vk/vk_dlss.cpp`: the DLSS feature is made for HDR colour (with NGX's auto exposure) when this order is on. - `gpu/vk/switches.def`, `docs/development.md`: `RX_VK_DLSS_PRE_BLOOM`. - Tests: `tests/test_dlss_pre_bloom.py/.cpp` (new); six checks that read the moved code follow it. ## Measurements **Verdict:** mixed. Stills are slightly sharper, and the darker, textured areas are steadier (bench and wall -33%, stone path -9%, distant haze -8%), but the bright static stone in the sun changes about 20% more from frame to frame, with 2.4 to 3.2 times as many pixels changing by more than 8 of 255. Every frame of the PR runs drew DLAA before the bloom. Not measured yet: on screen, in motion, in scenes with strong bloom. Hardware: Windows 11 Pro build 26300; NVIDIA GeForce RTX 5090, driver 621.24; AMD Ryzen 7 9800X3D, 64 GB Scene: Hyrule Market (child), day, the tester's saved spot, camera still; 5120x2160, NVIDIA DLAA, frame generation off, the tester's own settings otherwise Method: the game off-screen (`HOS_HEADLESS=1`) from the control bridge (`scripts/longshot_ctl.py`): 3 full-size stills, then 24 consecutive full-size frames (`RX_VK_SHOT_GO`), main and this PR in turn, 2 runs each; per region, the mean absolute frame-to-frame change of luma (0–255) over the 23 steps; the median of the 2 runs How to reproduce: `scripts/longshot_ctl.py launch <runtime> --env HOS_HEADLESS=1 --env RX_VK_FRAMEGEN=0 --env RX_VK_SHOT_W=5120 --env RX_VK_SHOT_H=2160 --env RX_VK_SHOTS=<dir> --env RX_VK_SHOT_GO=<file> --env RX_VK_SHOT_EVERY=1000000`, `press A` until in play at the saved spot, wait 12 s, create the go file until 24 frames are saved; per region, the mean over the pixels of |luma(n+1) - luma(n)| Builds: 4f71ed0c is this PR's change on c507b98c, the shared base's commit (both built from source, the same base); the PR's head on main differs from it only in a comment and one log line's text Why the numbers hold on main @ 39da4155: main and this change were measured on the same base, so the comparison is like for like; the change is the same after the rebase (`git range-diff`: equal); and none of main's renderer commits since c507b98c (quads with 8-bit indices, the depth margin of blended draws, pipeline warming and temporary pipelines, memory pressure) changes the scene's passes, the bloom or the DLSS chain measured here | | Before: main @ c507b98c | After: this PR @ 4f71ed0c | |---|---|---| | Frame-to-frame change, temple stairs and pillars (bright stone) | 0.723 (0.715, 0.731) | 0.883 (0.859, 0.907), +22% | | Frame-to-frame change, temple facade (bright stone) | 0.675 (0.663, 0.687) | 0.803 (0.774, 0.832), +19% | | Pixels changing by more than 8, stairs / facade | 0.27% / 0.23% | 0.67% / 0.72% | | Frame-to-frame change, castle and far trees (haze) | 1.077 (1.127, 1.027) | 0.989 (1.020, 0.957), -8% | | Frame-to-frame change, stone path (centre) | 2.490 (2.511, 2.468) | 2.266 (2.319, 2.212), -9% | | Frame-to-frame change, bench and wall | 1.221 (1.090, 1.352) | 0.823 (0.837, 0.809), -33% | | Frames drawn by DLAA / of them before the bloom (log status, 600 frames) | 600 / 0 | 600 / 600 (both runs) | ``` main, r4-main-1: vk: status: 600 frames, ...; NVIDIA DLAA: 600 frames drawn, 1 made, jitter -0.000 -0.167 px, ... PR, r4-pre-1: vk: status: 600 frames, ...; NVIDIA DLAA: 600 frames drawn (600 before the bloom), 1 made, jitter -0.000 -0.167 px, ... PR, r4-pre-1: vk: NVIDIA DLAA: the bloom's first pass is program ab3681946f93594a, the scene's reader 6 of 6: DLAA runs before it vk: NVIDIA DLAA draws before the game's bloom and tone map: 5120x2160, at program ab3681946f93594a vk: NVIDIA DLAA ran before the bloom: network 9dc98871eb7fc101 left out, its input copied (5120x2160) vk: NVIDIA DLAA: the bloom's first pass is program 95937683d9f74e95, the scene's reader 5 of 6: DLAA runs before it (the first frame learns the tone map's pass, the next learning moves to the bloom's first pass and stays there; the PR's head words that log line as "the first pass to read the scene after its last draw is program ...") ``` ### Flags and settings Adds `RX_VK_DLSS_PRE_BLOOM`. | Flag | What it is | Before this PR | After this PR | Effect | Helps / doesn't help / untested | Recommendation | |---|---|---|---|---|---|---| | `RX_VK_DLSS_PRE_BLOOM` | where DLAA runs | (none: after the bloom and tone map) | unset = before the bloom with DLAA; `=0` after, as before | DLAA on the linear scene before the bloom | sharper stills in the Market; steadier dark, textured areas; about 20% more frame-to-frame change on bright static stone; bloom-heavy scenes untested | on with DLAA (this PR's default); `=0` for an A/B or if the bright-stone shimmer shows in play | | `RX_VK_PARALLEL` | the parallel replay (not changed, only read here) | 2 and more: threads record a frame's passes | the same | with 2 and more, DLAA stays after the bloom (the passes are recorded out of order) | untested with this PR | as before | ## Testing **Tested:** Windows 11, RTX 5090, driver 621.24: the game off-screen at the Market spot, main and this PR in turn, 2 runs each (stills and 24-frame bursts); the log of every PR run says `600 frames drawn (600 before the bloom)` and names the bloom's program; `RX_VK_DLSS_PRE_BLOOM=0` gives main's route (checked on the earlier base). `tests/test_dlss_pre_bloom.py` passes; `tests/run_all.py --changed`: 163 pass, 16 fail, 6 skipped; the same 16 fail on main @ 39da4155 on this PC (among them test_switch_table, test_upscaler_rows, test_dlss_feature_size, test_recorder_sync, test_vk_occlusion_queries); `tests/test_tested_configurations.py` fails one Windows line-end case on main too. **Not tested:** a Linux build (standard C++ in the renderer, no OS calls; the Test Farm builds it); on screen in motion; native HDR output and PsychoV35 (written for their RGBA16F scene, not run); areas other than the Market (a frame whose passes differ falls back to the old place); DLSS frame generation on screen. **Must be tested:** - Windows, NVIDIA RTX, by hand: DLAA, walk through Kokiri Forest at night, the water at Lake Hylia and a dark room with Navi, with and without `RX_VK_DLSS_PRE_BLOOM=0`, expecting no new shimmer, halo or brightness change, and steadier bloom on small bright points. - Windows, NVIDIA RTX, native HDR on, by hand: the same spots with and without `RX_VK_DLSS_PRE_BLOOM=0`, expecting the same brightness and highlights as main (look at the sky, the sun on water and Navi's glow). ## Risks **What could break:** NVIDIA DLAA only: a scene whose passes differ from the Market's could run DLAA at the wrong place (the learning only takes a pass after the last scene draw, and a late scene draw sends the next frame back to the old place); DLSS's own auto exposure may make static edges change more from frame to frame. **Turning it off:** `RX_VK_DLSS_PRE_BLOOM=0`, or revert the commit. **Compatibility:** Nothing changes: no save, options file, cache or ABI change. ## Checklist ### Everyone - [x] One topic. - [x] The title is a Conventional Commit (`type(scope): description`) of the status line's type. - [x] Why gives the reason plainly and links the issues that fit (the tracker searched). - [x] Tested on my own PC where it runs (in the game, for a change the game runs), as Testing's Tested says; what can't be run by hand is in Testing's Not testable by hand, with why. - [x] Measurements has a verdict, or one line saying why there is nothing to measure. - [x] Nothing gets worse that I know of: any cost (speed, latency, memory, a setup that worked before) is measured and in Risks. - [x] Testing names what was tested, what wasn't, and what must still be tested, where and how. - [x] Rebased on current `main`. - [x] `python -I -B tests/run_all.py` passes (any failure that also fails on `main` is named). - [x] No game files, dumps, build output or generated files. - [x] `third_party/` untouched (a new folder with a `PROVENANCE.md` instead). - [x] The license is OK: GPL-3.0-or-later, nothing incompatible and nothing decompiled. ### When it applies - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. - [x] Numbers from the same PC, scene and settings, at least 2 interleaved runs each, the median reported. - [x] Switches documented (docs/development.md; the README for a menu row) and shipped at their recommended value. - [x] Screenshots of the same spot, captioned like the Measurements columns, for a change that shows on screen. - [x] A file in `docs/tested/` for each new measured run (format in `docs/tested-configurations.md`). - [x] A game-free test added for the fix, failing on `main` and passing here. - [x] A check under `tests/` that reads changed source updated in this PR, not weakened. - [x] Docs updated. Co-Authored-By: Claude Opus 5.5 <[email protected]> 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(vk): NVIDIA DLAA before the game's bloom and tone map
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
Website / Website on Cloudflare (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 8s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 12s
CI / Workflow lint (actionlint) (pull_request) Successful in 13s
Third-party parts / As their notes say (pull_request) Successful in 14s
Website / Website on Cloudflare (pull_request_target) Has been skipped
PR description / Description follows the template (pull_request_target) Successful in 3s
6dda8e56db
DLAA ran at the gameplay upscale network's place: after the game's bloom
and tone map, on the tone-mapped, square-root encoded picture. It now runs
on the scene's linear colour, after the frame's last draw into the scene
and before the bloom's first draw, with a feature made for HDR colour, and
writes its picture back into the scene. The bloom, the tone map and the
passes after them take the anti-aliased scene; the network's dispatch
becomes a copy, as the Upscaler's Off at 100% makes it.

The place is learned from the frame before (gpu/vk/pre_bloom.h): the first
draw that reads the scene after the frame's last draw into it, by program
and by its place among the frame's readers. A frame without that place
runs DLAA at the network as before. RX_VK_DLSS_PRE_BLOOM=0 keeps the old
order. DLSS's upscaling modes, FSR and XeSS are unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

Tested in game: Windows 11 Pro build 26300, NVIDIA GeForce RTX 5090, driver 621.24: Hyrule Market (child) at the tester's saved spot, 5120x2160 NVIDIA DLAA, the game off-screen (HOS_HEADLESS=1) from the control bridge, main @ c507b98c and this change on it in turn, 2 runs each. In every frame of the branch's runs DLAA ran before the bloom (the log's status: 600 frames drawn, 600 before the bloom; the place learned at the bloom's first pass 95937683d9f74e95, no fallback). Stills are slightly sharper, with no colour, halo or brightness change; with the camera still, the bright static stone changes about 20% more from frame to frame and the darker areas up to 33% less. Not yet run on screen in motion.

Tested in game: Windows 11 Pro build 26300, NVIDIA GeForce RTX 5090, driver 621.24: Hyrule Market (child) at the tester's saved spot, 5120x2160 NVIDIA DLAA, the game off-screen (HOS_HEADLESS=1) from the control bridge, main @ c507b98c and this change on it in turn, 2 runs each. In every frame of the branch's runs DLAA ran before the bloom (the log's status: 600 frames drawn, 600 before the bloom; the place learned at the bloom's first pass 95937683d9f74e95, no fallback). Stills are slightly sharper, with no colour, halo or brightness change; with the camera still, the bright static stone changes about 20% more from frame to frame and the darker areas up to 33% less. Not yet run on screen in motion.
Member

Possibly related, for context:

  • PR #620 WIP: feat(dlss): compose neural rendering over native HDR — Open DLSS/HDR work also touches temporal renderer routing and feature creation.
  • PR #108 fix(vk): an opt-in RGBA16F route for PsychoV35 HDR with DLSS and NVIDIA frame generation — Merged DLSS HDR feature setup in vk_temporal.cpp and vk_dlss.cpp is directly relevant precedent.
Possibly related, for context: - PR #620 WIP: feat(dlss): compose neural rendering over native HDR — Open DLSS/HDR work also touches temporal renderer routing and feature creation. - PR #108 fix(vk): an opt-in RGBA16F route for PsychoV35 HDR with DLSS and NVIDIA frame generation — Merged DLSS HDR feature setup in vk_temporal.cpp and vk_dlss.cpp is directly relevant precedent.
Author
Member

Measurements: added why the numbers measured on main c507b98c still hold on main 39da4155, the PR's base after the rebase (both sides on the same base; the change is identical after the rebase).

Measurements: added why the numbers measured on main c507b98c still hold on main 39da4155, the PR's base after the rebase (both sides on the same base; the change is identical after the rebase).
Author
Member

Pictures from the measured runs, the same spot and frames as Measurements: Before: main @ c507b98c (left) | After: this PR @ 4f71ed0c (right). 5120x2160, NVIDIA DLAA, camera still, crops at 2x.

Temple stairs, bright stone in the sun (still):

temple stairs

Temple facade (still):

temple facade

Bench and wall, darker and textured (still):

bench and wall

Temple stairs, 24 consecutive frames with the camera still (the frame-to-frame change in Measurements):

temple stairs burst

Pictures from the measured runs, the same spot and frames as Measurements: **Before: main @ c507b98c** (left) | **After: this PR @ 4f71ed0c** (right). 5120x2160, NVIDIA DLAA, camera still, crops at 2x. Temple stairs, bright stone in the sun (still): ![temple stairs](https://git.magicbean.dev/attachments/86325730-b3f2-4b52-87e7-8bf8e9d47895) Temple facade (still): ![temple facade](https://git.magicbean.dev/attachments/4b0de2f0-d9db-4a5e-bc88-a7f64385bda7) Bench and wall, darker and textured (still): ![bench and wall](https://git.magicbean.dev/attachments/b54724f6-df2f-40a1-bb29-5b11d3431828) Temple stairs, 24 consecutive frames with the camera still (the frame-to-frame change in Measurements): ![temple stairs burst](https://git.magicbean.dev/attachments/bbf5fc82-a7b8-4793-b92e-66502e2afb07)
HumanBean deleted branch feat/dlss-pre-bloom 2026-11-18 21:14:05 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot!1652
No description provided.