Skip to content

chore: remove hdr shader hacks#1444

Merged
doodlum merged 1 commit into
devfrom
remove-hdr-shader-hacks
Sep 8, 2025
Merged

chore: remove hdr shader hacks#1444
doodlum merged 1 commit into
devfrom
remove-hdr-shader-hacks

Conversation

@doodlum
Copy link
Copy Markdown
Collaborator

@doodlum doodlum commented Sep 8, 2025

Removes LUT texture and adaptation texture changes because being replaced with PP anyway and not sure how well that stuff works anyway

Summary by CodeRabbit

  • Refactor
    • Streamlined post-processing by removing legacy HDR adaptation and LUT handling, reducing resource usage and simplifying the rendering path.
    • Eliminated outdated shader-binding logic related to HDR/adaptation to improve maintainability and consistency.
  • Chores
    • Cleaned up unused hooks and resources tied to the deprecated HDR/adaptation workflow.
    • Simplified internal state handling without altering existing graphics settings or user workflows.
    • No impact on feature availability; rendering behavior remains consistent with current settings.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Sep 8, 2025

Walkthrough

This PR removes HDR/adaptation handling from the deferred renderer: deletion of adaptation texture setup, LUT loading, and HDR shader hack/binding functions in Deferred, plus removal of the HDRShaderHacks() call in State::Draw. Public API members for these features are removed from Deferred. No other control flow is changed.

Changes

Cohort / File(s) Summary
Deferred HDR/Adaptation removal
src/Deferred.cpp, src/Deferred.h
Deleted adaptation texture creation/use, LUT loading/field, and HDR-related methods (HDRShaderHacks(), BindAdaptationShader(), BindHDRShader()). Removed associated members: adaptationTextures[2], lutTexture. Simplified image-space shader path by eliminating adaptation/HDR bindings.
State draw path cleanup
src/State.cpp
Removed call to globals::deferred->HDRShaderHacks() in State::Draw when shader cache is enabled; no other flow changes.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Game
  participant State as State::Draw
  participant Deferred as Deferred

  Note over Game,Deferred: Previous flow (with HDR hack)
  Game->>State: Draw()
  State->>Deferred: HDRShaderHacks()  <<removed>>
  State->>Deferred: Other draw bindings

  rect rgba(230,245,255,0.5)
  Note over Game,Deferred: New flow (simplified)
  Game->>State: Draw()
  State->>Deferred: Other draw bindings
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • alandtse

Poem

I nibble the code, a tidy bite—
Out go the LUTs, HDR’s night.
Two tiny textures hop away,
Draw path slimmer by the day.
Ears up, I thump with glee:
Less fluff, same spree—render free! 🐇✨


📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3bed38c and bd9459a.

📒 Files selected for processing (3)
  • src/Deferred.cpp (0 hunks)
  • src/Deferred.h (0 hunks)
  • src/State.cpp (0 hunks)
💤 Files with no reviewable changes (3)
  • src/State.cpp
  • src/Deferred.h
  • src/Deferred.cpp
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build plugin and addons
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch remove-hdr-shader-hacks

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

github-actions Bot commented Sep 8, 2025

Using provided base ref: 3bed38c
Using base ref: 3bed38c
Base commit date: 2025-09-08T17:00:21+01:00 (Monday, September 08, 2025 05:00 PM)
No actionable suggestions for changed features.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Sep 8, 2025

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

@doodlum doodlum merged commit 62f2202 into dev Sep 8, 2025
17 checks passed
@alandtse alandtse deleted the remove-hdr-shader-hacks branch February 6, 2026 05:20
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