Add live RenoDX HDR tonemapper and PQ/scRGB output blit #554
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
hle
input
INTEL
lighting
linux-proton
memory
MULDER
needs-info
needs-logs
needs-rebase
NVIDIA
performance
post-merge
pr-diagnostics
pr-docs
pre-merge
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
relevance
high
relevance
low
relevance
medium
relevance
very-high
rendering
report
roadmap-proposal
saves
series-s
shaders
startup
status
blocked-by-rework
status
needs-test-report
status
needs-triage
status
ready-for-review
status
stale
status
superseded
status
wip
tools
ui
upstream
wontfix
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
TrustNo1/Darner!554
Loading…
Reference in a new issue
No description provided.
Delete branch "Swaizhd/Darner:feat/hdr-renodx"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What it changes
The problem on main: Darner's DARNER_HDR=1 already enables and presents the title's native HDR output, so the limitation is in the title's own HDR pipeline rather than Darner's presentation path. Like many console ACES HDR implementations, the title's baked ACES 3D LUT (CS_BakeACESWithGamutCompressTonemapOnlyLUT_QuasiLogShaper) and secondary blit (PS_BlitHDRACES) use a fixed curve with no user control over tonemapper, peak rolloff, paper white, shadow/highlight grading, or black-floor flare (the same issues players typically address with RenoDX). In addition, DARNER_HDR_PAPER_WHITE is currently read once at startup rather than adjustable live from the F1 menu.
This PR adds an opt-in, live-tunable RenoDX-style HDR tonemapping and display output pipeline (
DARNER_RENODX, defaultoff) under F1 ->DISPLAY:crates/darner-gpu/src/renodx.rs,draw.rs,pipeline.rs):CS_BakeACESWithGamutCompressTonemapOnlyLUT_QuasiLogShaper, backs up the title's original64x64x64FP16 AP1 3D LUT so switching back toOFFrestores vanilla rendering bit-for-bit without restarting.clshortfuse/renodx(daniele.hlsl,reno_drt.hlsl,DICE.hlsl,hermite_spline.hlsl,colorgrade.hlslv4,color/oklab.hlsl):RENODRT: Daniele filmic curve (ACES-matchedc_d = 10on100reference white and shadow toe) + OkLab hue preservation + highlight blowout.DICE/HERMITE: filmic toe pre-curve with luminance-preserving exponential / cubic-Hermite rolloff to display peak.DARNER_RENODX,DARNER_RENODX_PEAK,DARNER_RENODX_PAPER_WHITE,DARNER_RENODX_EXPOSURE,DARNER_RENODX_CONTRAST,DARNER_RENODX_SHADOWS,DARNER_RENODX_HIGHLIGHTS,DARNER_RENODX_SATURATION,DARNER_RENODX_BLOWOUT,DARNER_RENODX_FLARE).PEAK = AUTOreads display max luminance via DXGI (hdr_display_info).PS_BlitHDRACES):hdr_active()), replaces the title's secondary curve blit with a clean D60 AP1 -> D65 BT.2020 -> ST.2084 PQ (or scRGB) output pass with 10-bit triangular IGN dithering.host/hdr.rs,host/menu.rs,apps/darner/src/play.rs):DARNER_HDR_PAPER_WHITE(HDR UI WHITE NITS) live-adjustable via atomic storage on the F1DISPLAYpage and persistsDARNER_RENODX*andDARNER_HDR_PAPER_WHITEindarner-settings.txt.How it was tested
7cc7bd3245f26b3afa743f39291074a9a13557b6(based onorigin/mainc8258f95569c10fe75b5bfb785d3865b5deeefd9).cargo xtask policy—asset policy: 577 files ok(pass)cargo clippy --workspace --all-targets --locked -- -D warnings— 0 warnings/errors (pass)cargo clippy --workspace --all-targets --all-features --locked -- -D warnings— 0 warnings/errors (pass)cargo test --locked -p darner-core --lib— 50 passed, 0 failedcargo test --locked -p darner-loader --lib— 98 passed, 0 failedcargo test --locked -p darner --bins— 208 passed, 0 failed, 1 ignoredcargo test --locked -p darner-gpu --lib— 1826 passed, 81 ignored (1 pre-existing parallel flakewatch::watch_pipe_epoch_tests::ask_once_delta_reask_direct_carves_refreshes_and_updates_page_epochspassed when re-run solo);renodx::tests4/4 passed includingbake_and_blit_hlsl_compile_and_roundtrip_on_warp(D3DCompile + root signature + compute/graphics PSO creation on WARP).DARNER_RENODXdefaults tooff; whenoff, the title's original LUT andPS_BlitHDRACESare used unchanged).HDR TONEMAPPERlive betweenOFFandRENODRT/DICE/HERMITEand adjusting peak/paper-white/grading sliders in real time, confirming shadow black floor, midgray balance, highlight rolloff, and exact restoration onOFF.clippy --workspace --all-targets), Gate 2 (clippy --workspace --all-targets --all-features),cargo xtask policy, plus targeted unit tests ondarner,darner-gpu,darner-loader, anddarner-core. Gate 3 fullcargo test --workspacewas not run (darner-shaderis untouched by this PR).DARNER_HDR=1. In-game test ran on the identical RenoDX v2 shader/hook code prior to downgrading one-shot probe logs todebugand removing the unused custom-LUT probe for this clean branch.MaxLuminanceautomatically whenPEAK = AUTO); untested on AMD/Intel GPUs and scRGB (R16G16B16A16_FLOAT) swap chains in-game (scRGB PSO compilation is covered by the WARP unit test).darner-shadertest suite not run as translator code was not modified.Checklist
main.docs/asset-policy.md.Checked for overlap
crates/darner-gpu/src/host/menu.rsfor an unrelated reflection-resolution setting).Question: The game its self has HDR settings as well right. How do they compare with your new settings? Are those in game settings ignored and overwritten by your version?
Got any visual comparison what the difference will be?
Good question — here is how the two interact:
In-game HDR settings vs. RenoDX settings:
DARNER_RENODXis active (RenoDRT/DICE/Hermite), it overwrites the game's baked 3D ACES LUT (CS_BakeACESWithGamutCompressTonemapOnlyLUT_QuasiLogShaper) usingDARNER_RENODX_PEAK,DARNER_RENODX_PAPER_WHITE, and the RenoDX grading sliders, and replacesPS_BlitHDRACESwith a directAP1 -> BT.2020 -> ST.2084 PQ / scRGBpass with 10-bit dithering. So the game's own HDR peak/paper-white calibration and stock ACES tonemapping curve are effectively bypassed for the 3D world.DARNER_HDR=1, in-game HDR enabled) so the HDR LUT & blit path are used. Any separate in-game HUD/UI brightness (rendered outsidePS_BlitHDRACES) or pre-tonemap exposure adjustments remain controlled by the game, while Darner's own overlay usesDARNER_HDR_PAPER_WHITE.DARNER_RENODXback toOFFrestores the backed-up original 3D LUT bit-for-bit and falls back to the vanillaPS_BlitHDRACESpass immediately.Visual difference:
OFFvsRenoDRTlive in the F1 menu to see the difference instantaneously.)[pr-feature][rendering] Add live RenoDX HDR tonemapper and PQ/scRGB output blitto Add live RenoDX HDR tonemapper and PQ/scRGB output blitTest needed — commit
7cc7bd32; what to check:The problem on main: Darner's DARNER_HDR=1 already enables and presents the title's native HDR output, so the limitation is in the title's own HDR pipeline rather than Darner's presentation path. Like many console ACES HDR implementations, the title's baked ACES 3D LUT (CS_BakeACESWithGamutCompressTonemapOnlyLUT_QuasiLogShaper) and secondary blit (PS_BlitHDRACES) use a fixed curve with no user control over tonemapper, peak rolloff, paper white, shadow/highlight grading, or black-floor flare (the same issues players typically address with RenoDX). In addition, DARNER_HDR_PAPER_WHITE is currently read once at startup rather than adjustable live from the F1 menu.
This PR adds an opt-in, live-tunable RenoDX-style HDR tonemapping and display output pipeline (
DARNER_RENODX, defaultoff) under F1 ->DISPLAY:crates/darner-gpu/src/renodx.rs,draw.rs,pipeline.rs):CS_BakeACESWithGamutCompressTonemapOnlyLUT_QuasiLogShaper, backs up the title's original64x64x64FP16 AP1 3D LUT so switching back toOFFrestores vanilla rendering bit-for-bit without restarting.Evidence to post: card + driver, settings, commit tested, before/after (switch off vs on, two runs each), fps median and p99, and one line saying you looked at the picture.
Reply
testingto take this run; it's free again after 24 h with no results.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.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.