Fix inconsistent color clamping between Mobile and Forward+. #112927
+18
−23
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.
Also remove inconsistencies with glow blending code and comments between the two shader files to allow for easier comparison of the two tonemap files.
PR details
These inconsistencies come from the final rebase of #110077 where some differences slipped into
tonemap.glslwithout making their way intotonemap_mobile.glsl.It may appear that the code for glow blending with the mix blend mode when using a glow map texture has changed in the Forward+ renderer, but this should be mathematically equivalent to the existing code: clayjohn introduced a nice code simplification to this blending in
tonemap_mobile.glsl, so it makes sense to carry this simplification over totonemap.glsl.Bug details
The inconsistency of colour clamping can be seen when HDR 2D is disabled and the contrast colour adjustment is used:
master(9c56102)MRP: mobile-colour-clamping.zip