-
-
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
PMREMGenerator: Remove calls of convertSRGBToLinear(). #22318
Conversation
three.js/examples/webgl_furnace_test.html Line 113 in f4601f3
That means it is now necessary to set |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That means it is now necessary to set WebGLRenderer.outputEncoding to sRGBEncoding
No, that does not follow. The furnace test can be rendered in any colorspace. I'd remove the changes to the furnace test.
I think it would be best if @gkjohnson reviews the PMREM edits in this PR.
I've edited the example since |
I wrote the comment, and the comment is referring to the fact that The furnace test is broken until other issues with |
The changes to PMREMGenerator look good -- I'm not sure if any other types of output encodings are ever used for the renderer but my only comment is if only SRGB and Linear are supported and other output encodings might be used by users (not sure why they would be) you might want to log a warning. I'm not familiar enough with the furnace test or the interpretation of RGBE colors in the shaders to be much help there, though. |
Um, I guess I would add support for |
With the last commit I've added support for |
@Mugen87 @gkjohnson Sorry, but this PR is not correct.
If @gkjohnson is creating a PMREM from his current scene, that would be different use case. EDIT- And thank you @Mugen87 for working on this because it has helped me to clarify the problem. I think my statements are correct. :-) |
But in this case, any calls of |
Yes. And as I said, sRGB output encoding in |
Changed the title of the PR and updated the code. |
I see what you're saying. The couple times I've used PMREMGenerator it's been to render my current scene in order to get reflections on objects in that scene. It seems it would be difficult to simply support both use cases here. This comes back to something like #22275 and / or bookkeeping color space information on the Color class so the renderer has the relevant information to interpret the colors correctly. |
Merging for now so #22326 can be fixed. |
Thanks! |
Related issue: see #22286 (comment)
Description
PMREMGenerator
now honorsWebGLRenderer.outputEncoding
when converting to linear color space.This PR removes calls of
convertSRGBToLinear()
. Background/clear colors are assumed to be in linear color space.