-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Examples: Update from GammaCorrectionShader to OutputPass #26129
Examples: Update from GammaCorrectionShader to OutputPass #26129
Conversation
There is a problem with The transfer function should only be applied to luminance values that have been properly tone mapped to within transfer function's input range. (Less than 1 currently). So |
Great! I would prefer to not merge the PR before the examples are updated though. The number of examples using
AFAICS, this is not a problem specific to |
Correct.
Ultimately, an appropriate tone mapping function is determined by the viewing device and the viewing environment. Likewise, the OETF is device-specific. For what to do in the mean time, I'm open to suggestions. |
More flexible tone mapping functions are well worth exploring, as is output to Display P3. Both will take some time. In the meantime, some but not all of our tone mapping functions clamp. I don't think it would be appropriate for NoToneMapping or LinearToneMapping functions to clamp. We could do so before or after the OETF, but personally I also feel OK with just the implicit clamp imposed by the HTMLCanvas API. Aside – "Extended" sRGB values outside [0,1] are sometimes used. I have no interest in supporting this in three.js, except to say that passing values >1 through the sRGB OETF is not always the wrong choice. |
Let's start with just updating the examples, not deprecating GammaCorrectionShader quite yet. It appears there are failures in some examples, so I'll move this to draft status. |
@donmccurdy For now, I think it is appropriate to clamp When we support HDR displays, this will need to be revisited. |
Totally agree! Do you think we can move with this PR forward and update at least the example that do not break? I would love to see more usage of |
e3ab0fd
to
3c5bf85
Compare
@Mugen87 updated, thanks! |
No particular hurry, but if this is something we're interested in, I can make the same changes to the remaining examples. Would also be fine with updating usage but leaving GammaCorrectionShader un-deprecated. OutputPass is a very nice usability and performance improvement, @Mugen87. 👍
Related issue:
OutputPass
. #26102