Hide tonemap_exposure from editor when using Compatibility with BG_CANVAS.
#113863
+7
−1
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.
Issue description
Tonemap exposure does not work with the Compatibility renderer when the Environment background mode is set to Canvas:
post.glslto be usedThis issue is reproducible as far back as v4.3.stable.official [77dcf97]. In earlier versions of Godot 4, it is still reproducible, but the Canvas background mode seems to not function at all.
This issue is entirely separate from the issue that is fixed by #113861 as demonstrated by the optional step 4 that forces
post.glslto be used.This PR
This PR simply hides the non-functional tonemap exposure parameter in the specific configuration where it does not function. I have updated the docs to note this limitation.
Additionally, I have removed the old note that I had introduced as a part of #102820 that said:
Values provided to the tonemapper will also be multiplied by 2.0 and 1.8 for [constant TONE_MAPPER_FILMIC] and [constant TONE_MAPPER_ACES] respectively to produce a similar apparent brightness as [constant TONE_MAPPER_LINEAR].At the time I wrote this, I assumed it must be true, but for some scenes this is not true: The extra 2.0 and 1.8 multipliers actually make Filmic and ACES sometimes appear much brighter than Linear. So I really don't know why these extra multipliers exist and should never have added this unhelpful note in the first place.Why not just add support for exposure to Compatibility with
BG_CANVAS?I looked into this option and discovered that it is probably not worth it. Here is the summary of my decision:
post.glslto match the encoding that was used to create the glow textureSo currently, the behaviour is correct and as expected. If I were to add an exposure to
post.glsl, it would not correctly interact with the existing glow functionality's colour encoding.Maybe there is a way to work around this, but honestly I expect that very few people would even need this exposure feature for this specific configuration, so simply hiding it in the editor sounds to me like the correct choice. If there is a strong demand for the feature, we can try and solve this complicated problem then.
Cherry picks
I've added the cherry pick label for 4.4 and 4.5. Another label for 4.3 could be added, but I've chosen to omit this because the docs change will conflict. (It's a trivial conflict, though, so we could even cherry pick it to 4.3 if that's desired.)