Improve Environment saturation color adjustment.#111898
Open
allenwp wants to merge 1 commit into
Open
Conversation
This was referenced Oct 22, 2025
bfb6867 to
6a89bd4
Compare
Environment adjustments (favor visual quality).Environment saturation color adjustment.
6a89bd4 to
0a1f61d
Compare
This commit changes the saturation color adjustment to behave as follows for all rendering configurations: - Apply saturation with luminance weights on linear-encoded values, preventing brightness from changing with certain colors. - Apply contrast after saturation to avoid a performance regression when HDR 2D is disabled. This ordering is reversed compared to Godot 4.5 and earlier.
0a1f61d to
001c8c9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Environmentadjustments. godot-proposals#13195 (the remaining item relating to saturation)This commit changes the saturation color adjustment to behave as follows for all rendering configurations:
Rationale and screenshots
Rationale and screenshots for this PR can be found in godotengine/godot-proposals#13195.
Changes and improvements
Problem: Low-luminance colours change in apparent brightness when saturation is changed. A prime example is deep blue colours which appear to brighten when saturation is decreased and darken when saturation is increased.
The solution to this problem is to simply apply saturation to linear-encoded values using CIE luminance weights for the Rec. BT.709 primaries that Godot uses: