Skip to content

feat(projectmotorracing): Add HDR mod for Project Motor Racing - #680

Open
BVPR24 wants to merge 3 commits into
clshortfuse:mainfrom
BVPR24:BVPR
Open

BVPR24 wants to merge 3 commits into
clshortfuse:mainfrom
BVPR24:BVPR

Conversation

@BVPR24

@BVPR24 BVPR24 commented Sep 26, 2026

Copy link
Copy Markdown
Contributor

Pull request for my Project Motor Racing RenoDX HDR mod.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Medium severity

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.cpp wiring settings, Preset Off, device/swapchain output-mode selection (HDR10 vs scRGB), and resource upgrades.
  • New shared.h/common.hlsl defining 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/RenderIntermediatePass encoding.
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.

Comment thread src/games/projectmotorracing/addon.cpp Resolved
BVPR24 and others added 2 commits October 5, 2026 13:37
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>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants