Repository navigation
Conversation
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
It is a large game-specific HDR mod built on complex decompiled shaders that need in-game visual verification, and it contains an incomplete Preset Off reset that must be fixed and re-validated by a human.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
This PR adds a new RenoDX HDR addon for the game Project Motor Racing. It upgrades the game's SDR swapchain/intermediate resources to R16G16B16A16_FLOAT, injects HDR tone-mapping, color-grading, and bloom controls, and reworks the game's output/mirror/overlay pixel shaders to bridge the vanilla log-encoded LUT into an HDR display-mapped result. The HDR path is a proper bridge: it builds an engineered NeutralSDR baseline, samples the vanilla LUT in its log domain, then uses the three-argument UpgradeToneMap(untonemapped, neutral_sdr, graded_sdr) before per-channel neutral display mapping — so default grading values are neutral and preserve the vanilla look while extending range. Output mode prefers HDR10 and only falls back to scRGB on AMD/D3D12 as a compatibility case.
Changes:
- New
addon.cppwiring settings, Preset Off, device/swapchain output-mode selection (HDR10 vs scRGB), and resource upgrades. - New
shared.h/common.hlsldefining the injection struct, RenoDX defines, and grading/neutral-SDR/N2 display-mapping helpers. - Reworked output/mirror/overlay shaders implementing the vanilla-LUT HDR bridge and
SwapChainPass/RenderIntermediatePassencoding.
| File | Description |
|---|---|
src/games/projectmotorracing/addon.cpp |
Addon entrypoint: settings, Preset Off, device/swapchain setup, resource upgrades. Preset Off omits several grade resets. |
src/games/projectmotorracing/shared.h |
Injection struct and RenoDX tone-map/swapchain defines; valid define wiring. |
src/games/projectmotorracing/common.hlsl |
ApplyCustomGrade1/2, NeutralSDR, N2PerChannelLMS helpers; APIs verified to exist. |
src/games/projectmotorracing/output2_0xDA035448.ps_6_0.hlsl |
Main scene pass: bloom, vanilla-LUT HDR bridge via 3-arg UpgradeToneMap, overlay composite, SwapChainPass. |
src/games/projectmotorracing/output1_0x4AF5222F.ps_6_0.hlsl |
Scene+overlay composite into SwapChainPass. |
src/games/projectmotorracing/mirror_0x6872F9D6.ps_6_0.hlsl |
Mirror/reflection pass grading; Vanilla/0 saturate clamp emulation. |
src/games/projectmotorracing/steam_profile_icon_0x7626ED97.ps_6_0.hlsl |
Overlay icon linearized via gamma::DecodeSafe for the upgraded float buffer. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Added new color grading settings for highlights, blowout, flare, and scene. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Pull request for my Project Motor Racing RenoDX HDR mod.