fix(ll): remove gamma correction and set light mult to PI#2305
Conversation
…hting calculations
📝 WalkthroughWalkthroughThis PR centralizes linear-lighting enablement by replacing a gamma-correction flag with ChangesLinear Lighting Settings Refactoring
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 OpenGrep (1.20.0)OpenGrep fatal error (exit code 2): [00.11][ERROR]: Error: exception Unix_error: No such file or directory stat src/Features/LinearLighting.h Comment |
|
No actionable suggestions for changed features. |
|
✅ A pre-release build is available for this PR: |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/Features/LinearLighting.h (1)
1-1: ⚡ Quick winConsider a shorter conventional title and add issue linkage
The title is descriptive, but for strict Conventional Commit formatting you could shorten it to something like:
fix(ll): drop gamma toggle, apply pi scaling.
If this PR resolves tracked work, add a footer such asFixes #<issue>orAddresses #<issue>.As per coding guidelines, "When reviewing PRs, please provide suggestions for: 1. Conventional Commit Titles ... 2. Issue References ..."
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/Features/LinearLighting.h` at line 1, Update the PR title to follow Conventional Commit style (e.g., "fix(ll): drop gamma toggle, apply pi scaling") and add an issue linkage footer in the PR description or commit message (e.g., "Fixes #<issue>" or "Addresses #<issue>") so it maps to tracked work; edit the PR title field and the last commit message or PR description accordingly to include the shorter conventional title and the Fixes/Addresses footer.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/Features/LinearLighting.h`:
- Line 1: Update the PR title to follow Conventional Commit style (e.g.,
"fix(ll): drop gamma toggle, apply pi scaling") and add an issue linkage footer
in the PR description or commit message (e.g., "Fixes #<issue>" or "Addresses
#<issue>") so it maps to tracked work; edit the PR title field and the last
commit message or PR description accordingly to include the shorter conventional
title and the Fixes/Addresses footer.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: c7e84f9c-27f0-4284-9729-0022d12fc683
📒 Files selected for processing (2)
package/Shaders/Common/SharedData.hlslisrc/Features/LinearLighting.h
🚧 Files skipped from review as they are similar to previous changes (1)
- package/Shaders/Common/SharedData.hlsli
…shaders#2305) Branch-preserving adaptation: remove this branch's Linear Lighting gamma-correction toggle and ISHDR gamma-conversion block without importing upstream HDR display mapping changes. Keep a branch-local Linear Lighting cache bump.
…shaders#2305) Branch-preserving adaptation: remove this branch's Linear Lighting gamma-correction toggle and ISHDR gamma-conversion block without importing upstream HDR display mapping changes. Keep a branch-local Linear Lighting cache bump.
This pull request removes the
enableGammaCorrectionsetting and related code across the linear lighting system, and makes minor improvements to lighting calculations and data structure alignment. The main focus is on simplifying configuration and data passed to shaders, while ensuring correct alignment and lighting math.Linear Lighting Settings and Data Structure Simplification:
enableGammaCorrectionfield from theLinearLighting::Settingsstruct, associated UI, serialization, and all per-frame data structures, streamlining the configuration and data sent to shaders. [1] [2] [3] [4] [5] [6]pad0) and a static assertion to ensurePerFrameDatais 16-byte aligned, preventing potential GPU alignment issues. [1] [2]Shader Logic Improvements:
DirectionalLightandPointLightfunctions inColor.hlslito multiply light multipliers byMath::PIwhen linear lighting is enabled, improving physical correctness.ISHDR.hlslthat depended on the removed setting.Code Formatting:
bloomMaskcalculation for readability inISHDR.hlsl.Summary by CodeRabbit
Bug Fixes
UI Changes
Chores