-
-
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
WebGLRenderer: .physicallyCorrectLights
-> .useLegacyLights
#24975
Conversation
After the We definitely need a guide (maybe in the forum) that explain users how to restore the lighting with |
Will need more explanation, but some references in:
@WestLangley I'm not sure I understand the motivation here yet — if our goal is to change the default lighting model, and then remove the property entirely some time after that, what is the benefit of asking everyone to switch to a new name for the property during that transition? Is it that if people are switching back to the old mode during the transition, we want it to have a name that is more obviously not recommended long-term? We could also use a deprecation warning for that. |
This PR requires no change to the screenshots. In a later PR, Whether that change occurs immediately (this release), or in a future release, is up to @mrdoob. |
Small addition: Each example has to be checked and updated when this change is going to be made. Without updates the lighting of many examples will look awful. Besides, I also share concerns about renaming the property. TBH, it feels like an unnecessary change. I would prefer to keep the property |
We are asking all users already on PBR lights to update their code, replacing... renderer.physicallyCorrectLights = true; ... with ... renderer.useLegacyLights = false; What benefit do you see for imposing this migration cost?
My assumption has been that |
From my discussions with @mrdoob, he wishes to ensure that books, courses, and user examples are not broken. Having a flag The new lighting model is the one that all other engines use. The transition is occurring NOW, with this PR. The We can set Or you can wait until the next release. If you wait, then you are imposing a minor migration cost for the users who use PBR lights (and in our cases, 5 of 350 three.js examples). |
This PR looks like the reverse of #24940. I think we should decide on one API over another - either |
I was not aware that @mrdoob wants to keep a property to toggle different lighting. From #23897, I thought the respective flag will eventually be removed so there is only a single lighting mode. Considering this, having a flag that enables the "legacy lighting" is fine with me. |
@WestLangley I'm really hoping for a few words explaining why ".useLegacyLights" is a preferable name to ".physicallyCorrectLights". The roadmap and next steps you describe are fine with me. But I'd like to be able to explain to users why the property has been renamed from A to B. |
The user does not get physically-correct lighting simply by setting the Recall that we impose SI units for light intensities. So,
As you know, the renderer allows for any decay and any distance units. For these reasons, I feel the term I prefer, instead, to refer to "PBR materials". I also prefer not to require the user to set a flag at all -- unless the user wants to use the legacy light models. |
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.
@WestLangley I'm happy with that reasoning — thank you!
So, if this PR is merged, the next step is to decide if If it is set to How does everybody feel about that? |
I think r147 is too close to change the default. I'd be open to making both changes together in r148, if we can update more of the examples by then and write up a short migration guide. My concern is that if we change the default without having that advice ready, fewer users will opt to keep the new default. |
I suggest to defer this change even one more release. In |
I'm fine either way on that. In semver-land it's considered preferable to pack breaking changes together into larger (major) releases. But if it's too much for us to test and prepare for the same release on time, that's another matter. |
/bump |
Weighing these two options:
I'm leaning toward (B), and would be happy to help write the guide if we are going that direction. I'm not as keen to write a guide focused on the legacy lighting behavior if not. 😇 |
Hmmm, I'll merge this for now and I'll do a new PR changing the default to see how many examples break... |
This is a first step in the transition to make physically-correct behavior the default.
For now,
renderer.useLegacyLights
defaults totrue
.In a follow-up PR, and when it seems appropriate, the default value will be changed to
false
.The docs will be updated shortly in a separate PR.