Skip to content

fix(upscaling): UI ghosting when HDR is unloaded#2195

Merged
alandtse merged 1 commit into
community-shaders:devfrom
SkrubbySkrubInAShrub:HDR-UI-fix-2
Apr 24, 2026
Merged

fix(upscaling): UI ghosting when HDR is unloaded#2195
alandtse merged 1 commit into
community-shaders:devfrom
SkrubbySkrubInAShrub:HDR-UI-fix-2

Conversation

@SkrubbySkrubInAShrub
Copy link
Copy Markdown
Collaborator

@SkrubbySkrubInAShrub SkrubbySkrubInAShrub commented Apr 23, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Improved HDR display buffer initialization logic to activate based on swap chain status rather than feature load state, enhancing reliability of HDR display functionality during Direct3D 12 operations.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 23, 2026

📝 Walkthrough

Walkthrough

Upscaling::PostDisplay is simplified to call globals::features::hdrDisplay.SetUIBuffer() based solely on d3d12SwapChainActive being true, eliminating the previous conditional check for hdrDisplay.loaded state.

Changes

Cohort / File(s) Summary
HDR UI Buffer Setup
src/Features/Upscaling.cpp
Removed hdrDisplay.loaded feature-state gate from PostDisplay; SetUIBuffer() now called whenever D3D12 swap chain is active. Control flow simplified from nested conditional to single condition check.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • skyrim-community-shaders#2098: Modifies SetUIBuffer behavior for VR scenarios, directly related to the HDR UI buffer call pattern changed in this PR.
  • skyrim-community-shaders#2175: Adjusts how hdrDisplay feature state is gated elsewhere in the codebase, complementary to this removal of the loaded-state check.

Suggested reviewers

  • alandtse
  • doodlum

Poem

🐰 A condition shed, the path runs clear,
No loaded-gate to disappear,
When swap chains live, the HDR gleams,
Simpler flows, like rabbit dreams! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title 'fix(upscaling): UI ghosting when HDR is unloaded' accurately describes the primary bug fix in the pull request, which addresses UI ghosting issues by changing how HDR UI buffer setup is triggered.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

No actionable suggestions for changed features.

@github-actions
Copy link
Copy Markdown

✅ A pre-release build is available for this PR:
Download

@doodlum doodlum changed the title fix(Upscaling): UI ghosting when HDR is unloaded fix(upscaling): UI ghosting when HDR is unloaded Apr 23, 2026
@alandtse alandtse merged commit b6a7fb2 into community-shaders:dev Apr 24, 2026
16 checks passed
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.

3 participants