-
-
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
Added LogLuvLoader. #22857
Added LogLuvLoader. #22857
Conversation
Nice! Seems like the best way to compare them is to put the slider at 0.02. Logluv seems are nice looking as hdr but a bit more orangy. |
BTW: Depending on the feedback in #22757 (comment) I'll change the RGB color conversion matrix which will lead to a slight hue shift. |
Using the matrix from the respective paper for now: http://www.anyhere.com/gward/papers/jgtpap1.pdf |
Now it looks kind of pale... Is that normal? |
TBH, I'm not yet 100% sure which color conversion matrix is the correct one. But according to the paper and |
Wait, the numbers in the matrix were not correct! Now it looks better and similar to our existing HDR examples: |
three.js does not currently handle color space accurately. But, for the purpose of doing something reasonably-consistent, we can assume we want to convert to linear-sRGB color space -- i.e., the sRGB primaries and the D65 white point, without the gamma correction. So, I would assume the correct matrix to use is the sRGB matrix. The three.js working color space is implicitly linear-sRGB. |
I don't think this would be correct. Sticking to the specification of the paper produces the result I have originally expected (meaning a result comparable and consistent to other HDR loaders). Using the sRGB matrix produces a wrong hue shift. |
Sounds like this is good enough for now 😊 |
Thanks! |
Related issue: #22757
Description
This PR introduces
LogLuvLoader
which allows to load HDR images in the LogLuv TIFF format.The code uses parts of
UTIF
for parsing TIFF images and a customtoRGBA()
method to extract HDR texels in linear RGB color space. The default texture type is half float. Using single precision float is supported.