-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
RGBELoader: Clamp prior to converting to half float #22451
Conversation
I think a warning in #22444 instead of a clamp would be a good idea. That way, we will not be obfuscating the problem. |
I personally favored #22444. Now, I just want to see this issue fixed. I don't have a strong opinion anymore whether we clamp in the loader or in |
That makes sense to me actually. A warning in |
@WestLangley What do you think the warning message should be? |
Maybe console.warn( 'THREE.DataUtils.toHalfFloat(): value exceeds 65504.' ); three.js does not typically validate data, however. I was thinking a warning would be useful in alerting us to other possible problems. But that was just a thought... |
How about: b85fa19 |
That looks good to me 👍 |
Thanks! |
Since you have merged both PRs, the clamping is now implemented two times. One should be sufficient, no 😇 ? |
Hmm, up to you. I agree with @WestLangley that |
Whatever! At least we have one more closed issue 🎉 . |
No more UFOs! 😁 |
Fixes #22435.
In lieu of #22444. (It is the calling app's responsibility to decide how to clamp large values.)
In this PR, the clamping is per-channel independently. Clamping to prevent a hue shift is also reasonable if users complain. But ACES Filmic shifts hue anyway, so for now, I think this is OK.
Below: Linear tone mapping and exposure set to 0.01. You can see how bright the sun is compared to the rest of the sky.