feat: HDR rendering#1692
Conversation
* build: bump eastl to 3.27.01 (community-shaders#1673) Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> * fix(grass collision): ignore hkpListShape (community-shaders#1661) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * chore(upscaling): update SDKs (community-shaders#1684) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * chore(terrain shadows): modernize (community-shaders#1678) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * feat: add user wiki link to readme (community-shaders#1689) * feat(LLF): add debug overlay in llf visualiser (community-shaders#1666) * feat: linear lighting (community-shaders#1359) Co-authored-by: jiayev <jiayev@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * feat: weather and imagespace editor (community-shaders#1630) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fix(ui): load previously selected theme on startup (community-shaders#1664) --------- Co-authored-by: Alan Tse <alandtse@users.noreply.github.com> Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com> Co-authored-by: doodlum <15017472+doodlum@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: jiayev <l936249247@hotmail.com> Co-authored-by: jiayev <jiayev@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
|
No actionable suggestions for changed features. |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis pull request introduces comprehensive HDR (High Dynamic Range) display support. It adds a new HDRDisplay feature that detects HDR-capable monitors and manages HDR rendering through enhanced shader utilities for color-space conversions and tonemapping. The implementation includes framebuffer redirection for UI compositing, compute shaders for HDR output and brightness handling, swap-chain format upgrades (R10G10B10A2 for HDR10), and integration with the upscaling system to preserve HDR data during post-processing. Changes
Sequence Diagram(s)sequenceDiagram
participant Game as Game Engine
participant HDRMgr as HDR Singleton
participant D3D as D3D11/D3D12
participant ShaderPipe as Shader Pipeline
participant UIComp as UI Compositor
participant Present as Swap Chain Present
Game->>HDRMgr: DetectHDRDisplay()
HDRMgr->>D3D: Query display capabilities (DXGI)
D3D-->>HDRMgr: isHDRMonitor state
Game->>HDRMgr: SetupResources()
HDRMgr->>D3D: Create HDR textures (float16, R10G10B10A2)
HDRMgr->>D3D: Upgrade swap chain to HDR10
D3D-->>HDRMgr: Textures & swap chain ready
Game->>Game: Render scene
Game->>ShaderPipe: ISHDR shader (HDR enabled)
ShaderPipe->>ShaderPipe: Branch HDR vs SDR path
Note over ShaderPipe: HDR: Preserve >1.0, DICE tonemap<br/>SDR: Clamp to 0–1
ShaderPipe-->>Game: Scene rendered
Game->>HDRMgr: BeginUIRendering()
HDRMgr->>D3D: Redirect RTV to HDR UI texture
Game->>Game: Render UI (ImGui)
Game->>HDRMgr: EndUIRendering()
HDRMgr->>D3D: Restore RTV
HDRMgr->>UIComp: HDROutputCS (composite shader)
UIComp->>UIComp: Convert UI sRGB → BT.2020 → PQ
UIComp->>UIComp: Blend UI with scene PQ
UIComp-->>HDRMgr: Composited HDR output
Game->>Present: IDXGISwapChain::Present()
Present->>Present: ApplyHDR() if HDR ready
Present->>D3D: Copy HDR output to swap chain
D3D-->>Present: HDR frame presented
Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Automated formatting by clang-format, prettier, and other hooks. See https://pre-commit.ci for details.
Automated formatting by clang-format, prettier, and other hooks. See https://pre-commit.ci for details.
Automated formatting by clang-format, prettier, and other hooks. See https://pre-commit.ci for details.
Automated formatting by clang-format, prettier, and other hooks. See https://pre-commit.ci for details.
Automated formatting by clang-format, prettier, and other hooks. See https://pre-commit.ci for details.
Automated formatting by clang-format, prettier, and other hooks. See https://pre-commit.ci for details.
game renders entirely in HDR, with tonemapping at the end to clamp to SDR & gamma convert or output HDR
Summary by CodeRabbit