[draft] [pr-feature][rendering][lighting][RAYTRACING] F1 RT DENOISERS: the game's own ray tracing denoisers off (DARNER_TITLE_DENOISERS=0, on by default) #401

Closed
paales wants to merge 1 commit from paales/title-denoisers into main AGit
First-time contributor

Written by 🤖:

Refs #66

Contributor role (optional)

  • Fluxer ID:

What it changes

  • The problem on main: the game filters its ray-traced reflections, shadows and indirect light with its own denoisers, and no setting of the game turns them off. Its reflection filter leaves blocks, blotches and sparkles in glass, its shadow filter blurs contact shadows, and its glass resolve CS_TemporalResolve1_Alpha is dropped on 32-lane hosts (#66), so some glass is dark (the cafe window in the police cutscene).

DARNER_TITLE_DENOISERS=0, or F1: PICTURE > RT DENOISERS (the row after RAY TRACING), leaves them out at the next start. It takes paths the game has itself: 8 code patches in KnownBuild::denoisers_off, each checked against its old bytes as the existing patches are.

Effect Path the game takes
Reflections The settings loader writes 0 to the spatial-filter bool: TemporalResolveOpaque runs in place of SpatialFilter_Std, SpatialFilter and TemporalResolve2. Blur count 0: no BilateralBlur, no UpdateHistory. History length 1, and the frame setup's camera-cut path every frame.
Shadows The shadow mask's denoise stage (passes 12 to 21, in place) is not called: the lighting reads the traced mask.
Indirect light The frame setup's camera-cut path every frame: the probe resolve binds a default history texture, history length 1.

The GI probe filters and the bent cones have no such path and stay. On by default: nothing changes for a player who sets nothing. docs/fork-ray-tracing.md has the addresses and the measurements; the README's lighting table has the row.

How it was tested

  • Tested revision: bc4d0a99. The game build had an earlier wording of the help text; the code is the same.

  • Commands and results:

    • cargo test --locked -p darner-gpu --lib menu -- --include-ignored: 57 passed (help lines within 60 columns; DARNER_MENU_SHOT makes the menu picture with the new row).
    • cargo xtask policy: 555 files ok.
    • In the game, the log of every run with the switch has the 8 lines title patch +0x... DARNER_TITLE_DENOISERS=0, ..., and all runs end without a crash (night lot, police cutscene, house: one run each way).
  • Changes a default: no.

  • A/B result: the switch is off by default. Checked in the game, one run each way per scene. Change between captures 500 ms apart is the mean absolute luminance difference (0 to 255) over a static view, 16 to 30 s, on the night lot:

    A (RT DENOISERS ON) B (OFF)
    Bush shadow on a pillar, change between captures 1.79 4.32
    The pillar, change between captures 0.69 2.17
    Frame rate / card time a frame (card meter) 25.3 fps / 23.3 ms 27.6 fps / 24.4 ms

    On an older base with a diagnostics build and the same 8 patches through DARNER_TITLE_PATCH: the dispatch capture has no SpatialFilter_Std, SpatialFilter, TemporalResolve2, TemporalResolve1_Alpha, BilateralBlur, UpdateHistory or DenoiseShadowMaskLDSPacked; none of them is among the 60 most costly pipelines (DARNER_CARD_METER_PIPELINES=1, 0.06 ms a frame each at most); the card's time a frame changes by 1.4 ms at most, in both directions, over 3 scenes.

  • Gates run on bc4d0a99: both clippy gates pass. cargo test --workspace --locked: 2117 passed, 1 failed (host::refresh_tests::refresh_front_zero_arc_matches_and_runs_due). The write-watch tests fail now and then in the full run on main f3840d73 too: three runs of cargo test -p darner-gpu --lib there had 1, 2 and 0 failures among the same tests, and each passes on its own.

  • Gameplay: RTX 5070 Ti, Series X profile, 3840x2160 output, DLSS Performance (super resolution), no frame generation, hardware ray tracing.

  • Shader wave sizes tested: 32 lanes.

  • Hardware dependence: the patches are in the game's own code, so likely general. The dark glass needs a 32-lane host (#66).

  • Coverage gaps: AMD, Intel, Series S and software ray tracing not tested. The GI's probe filters stay.

Pictures (cropped from 3840x2160 captures, the same scene and time, A and B) follow in a comment.

Checklist

  • I ran this change in the game, or say below why it can't be (docs, tests only).
  • This PR contains one change based on main.
  • The diff follows docs/asset-policy.md.
  • I recorded this PR's dependencies below.
    • Depends on: none

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches.
  • Related PRs: #9, #12 and #16 (rows on the same F1 page, the same files), #328 (F1 menu clicks), #14, #15 and #17 (reflection fixes in other code).
  • Replaces or overlaps: none found.
_Written by 🤖:_ Refs #66 ## Contributor role (optional) - Fluxer ID: ## What it changes - The problem on main: the game filters its ray-traced reflections, shadows and indirect light with its own denoisers, and no setting of the game turns them off. Its reflection filter leaves blocks, blotches and sparkles in glass, its shadow filter blurs contact shadows, and its glass resolve `CS_TemporalResolve1_Alpha` is dropped on 32-lane hosts (#66), so some glass is dark (the cafe window in the police cutscene). `DARNER_TITLE_DENOISERS=0`, or F1: PICTURE > RT DENOISERS (the row after RAY TRACING), leaves them out at the next start. It takes paths the game has itself: 8 code patches in `KnownBuild::denoisers_off`, each checked against its old bytes as the existing patches are. | Effect | Path the game takes | |---|---| | Reflections | The settings loader writes 0 to the spatial-filter bool: `TemporalResolveOpaque` runs in place of `SpatialFilter_Std`, `SpatialFilter` and `TemporalResolve2`. Blur count 0: no `BilateralBlur`, no `UpdateHistory`. History length 1, and the frame setup's camera-cut path every frame. | | Shadows | The shadow mask's denoise stage (passes 12 to 21, in place) is not called: the lighting reads the traced mask. | | Indirect light | The frame setup's camera-cut path every frame: the probe resolve binds a default history texture, history length 1. | The GI probe filters and the bent cones have no such path and stay. On by default: nothing changes for a player who sets nothing. `docs/fork-ray-tracing.md` has the addresses and the measurements; the README's lighting table has the row. ## How it was tested - Tested revision: bc4d0a99. The game build had an earlier wording of the help text; the code is the same. - Commands and results: - `cargo test --locked -p darner-gpu --lib menu -- --include-ignored`: 57 passed (help lines within 60 columns; `DARNER_MENU_SHOT` makes the menu picture with the new row). - `cargo xtask policy`: 555 files ok. - In the game, the log of every run with the switch has the 8 lines `title patch +0x... DARNER_TITLE_DENOISERS=0, ...`, and all runs end without a crash (night lot, police cutscene, house: one run each way). - Changes a default: no. - A/B result: the switch is off by default. Checked in the game, one run each way per scene. Change between captures 500 ms apart is the mean absolute luminance difference (0 to 255) over a static view, 16 to 30 s, on the night lot: | | A (RT DENOISERS ON) | B (OFF) | |---|---|---| | Bush shadow on a pillar, change between captures | 1.79 | 4.32 | | The pillar, change between captures | 0.69 | 2.17 | | Frame rate / card time a frame (card meter) | 25.3 fps / 23.3 ms | 27.6 fps / 24.4 ms | On an older base with a diagnostics build and the same 8 patches through `DARNER_TITLE_PATCH`: the dispatch capture has no `SpatialFilter_Std`, `SpatialFilter`, `TemporalResolve2`, `TemporalResolve1_Alpha`, `BilateralBlur`, `UpdateHistory` or `DenoiseShadowMaskLDSPacked`; none of them is among the 60 most costly pipelines (`DARNER_CARD_METER_PIPELINES=1`, 0.06 ms a frame each at most); the card's time a frame changes by 1.4 ms at most, in both directions, over 3 scenes. - Gates run on bc4d0a99: both clippy gates pass. `cargo test --workspace --locked`: 2117 passed, 1 failed (`host::refresh_tests::refresh_front_zero_arc_matches_and_runs_due`). The write-watch tests fail now and then in the full run on `main` f3840d73 too: three runs of `cargo test -p darner-gpu --lib` there had 1, 2 and 0 failures among the same tests, and each passes on its own. - Gameplay: RTX 5070 Ti, Series X profile, 3840x2160 output, DLSS Performance (super resolution), no frame generation, hardware ray tracing. - Shader wave sizes tested: 32 lanes. - Hardware dependence: the patches are in the game's own code, so likely general. The dark glass needs a 32-lane host (#66). - Coverage gaps: AMD, Intel, Series S and software ray tracing not tested. The GI's probe filters stay. Pictures (cropped from 3840x2160 captures, the same scene and time, A and B) follow in a comment. ## Checklist - [x] I ran this change in the game, or say below why it can't be (docs, tests only). - [x] This PR contains one change based on `main`. - [x] The diff follows `docs/asset-policy.md`. - [x] I recorded this PR's dependencies below. - Depends on: none ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. - Related PRs: #9, #12 and #16 (rows on the same F1 page, the same files), #328 (F1 menu clicks), #14, #15 and #17 (reflection fixes in other code). - Replaces or overlaps: none found.
Author
First-time contributor

Human here: Comparison RR vs Original and a bonus screenshot with the in game denoiser completely off.

Human here: Comparison RR vs Original and a bonus screenshot with the in game denoiser completely off.
Author
First-time contributor

Haha, ok, this isn't nearly ready.. I'll update the pr when ready.

Haha, ok, this isn't nearly ready.. I'll update the pr when ready.
paales changed title from [pr-feature][rendering][lighting][RAYTRACING] F1 RT DENOISERS: the game's own ray tracing denoisers off (DARNER_TITLE_DENOISERS=0, on by default) to [draft] [pr-feature][rendering][lighting][RAYTRACING] F1 RT DENOISERS: the game's own ray tracing denoisers off (DARNER_TITLE_DENOISERS=0, on by default) 2026-12-04 20:23:52 +00:00
paales closed this pull request 2026-12-04 21:33:48 +00:00
First-time contributor

Thanks for this. Your first comment mentions an RR comparison: are you working on DLSS Ray Reconstruction on top of this switch?

With the title's denoisers off, RR looks like the natural next step, since it replaces both the denoisers and the upscaler in one pass. As far as I can see, Darner's DLSS path only takes the inputs of the title's ffxDispatch (colour, depth, motion vectors, exposure, reactive mask). RR also needs diffuse and specular albedo, normals and roughness, and ideally the specular hit distance. Do you already know where the title writes those, or have an RR branch?

We're mapping the G-buffer on our side to size the work, and we'd be glad to share what we find and test an RR build under Proton on an RTX 4080 (Ada, 32 lanes), including whether the dark glass from #66 shows there.

Thanks for this. Your first comment mentions an RR comparison: are you working on DLSS Ray Reconstruction on top of this switch? With the title's denoisers off, RR looks like the natural next step, since it replaces both the denoisers and the upscaler in one pass. As far as I can see, Darner's DLSS path only takes the inputs of the title's `ffxDispatch` (colour, depth, motion vectors, exposure, reactive mask). RR also needs diffuse and specular albedo, normals and roughness, and ideally the specular hit distance. Do you already know where the title writes those, or have an RR branch? We're mapping the G-buffer on our side to size the work, and we'd be glad to share what we find and test an RR build under Proton on an RTX 4080 (Ada, 32 lanes), including whether the dark glass from #66 shows there.
First-time contributor

Follow-up on #66: on current main with ray tracing on, play sets DARNER_EXACT64=1 (EXACT64_RT in apps/darner/src/play.rs), so 34992f2b65a789a5 (CS_TemporalResolve1_Alpha) is folded exactly and translates. Without ray tracing it is still left out on purpose: folded, it washed out the phone screen (CodeFloe 267).

We checked it under Proton on an RTX 4080 (32 lanes), hardware ray tracing, a main-based build. In all three runs the program translated and nothing was refused:

  • In the boat mission cutscene, the cafe window shows its reflection, with no dark panel.
  • Car glass and paint reflect palm trees and sky that are off screen.
  • The prison cutscene's phone screen shows its apps and isn't washed out. In earlier builds it didn't show at all.

So the dark cafe board in your doc looks like the older base you measured on. Does it still show dark for you on current main with RT on?

Follow-up on #66: on current `main` with ray tracing on, `play` sets `DARNER_EXACT64=1` (`EXACT64_RT` in `apps/darner/src/play.rs`), so `34992f2b65a789a5` (`CS_TemporalResolve1_Alpha`) is folded exactly and translates. Without ray tracing it is still left out on purpose: folded, it washed out the phone screen (CodeFloe 267). We checked it under Proton on an RTX 4080 (32 lanes), hardware ray tracing, a `main`-based build. In all three runs the program translated and nothing was refused: - In the boat mission cutscene, the cafe window shows its reflection, with no dark panel. - Car glass and paint reflect palm trees and sky that are off screen. - The prison cutscene's phone screen shows its apps and isn't washed out. In earlier builds it didn't show at all. So the dark cafe board in your doc looks like the older base you measured on. Does it still show dark for you on current `main` with RT on?

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
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
TrustNo1/Darner!401
No description provided.