Tonemapping: Added Luma-based Reinhard Tonemapping Option #3
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.
Description
I propose the addition of Reinhard-Luminance tonemapping, from this blog post. On that page, this is the function
reinhard_extended_luminance
withmax_white_l
set to infinity, and then the equation simplified. According to these sources (1 2 3), the correct luminance coefficients for linear light are (0.2126, 0.7152, 0.0722), which is also the coefficients given in that blog post. The coefficients (0.299, 0.587, 0.114) which are pervasive in three.js are incorrect, but work better when the input is in sRGB/gamma space.This is a trivial improvement to the existing Reinhard tonemapping. The difference is that Reinhard-Luminance uses lumninance in the denominator, rather than curving the color channels independently. Curving the color channels independently can result in desaturation and incorrect hue (the hue veers towards cyan, yellow, or magenta). Reinhard-Luminance does the best job of not doing that.
The existing tonemapping options quickly become saturated at sizeable exposure values. At low exposure values, Cineon and ACES are underexposed. Reinhard-Luminance doesn't have these issues.
From my testing, some of the tonemapping options look good at certain brightnesses, but only Reinhard-Luminance looks consistently good at all brightnesses.
This contribution is funded by Threekit