WebGLRenderer: Deprecate useLegacyLights, change default to false.#26392
Merged
Mugen87 merged 1 commit intomrdoob:devfrom Jul 11, 2023
Merged
WebGLRenderer: Deprecate useLegacyLights, change default to false.#26392Mugen87 merged 1 commit intomrdoob:devfrom
useLegacyLights, change default to false.#26392Mugen87 merged 1 commit intomrdoob:devfrom
Conversation
Collaborator
Author
This was referenced May 30, 2023
This was referenced Jul 13, 2023
cstegel
added a commit
to cstegel/three.js
that referenced
this pull request
Jul 26, 2023
See: 1. mrdoob#26392 2. mrdoob#26267 The default behavior of light intensities was changed. Some examples had the light intensity values changed from 1 to 3 to preserve the old behavior. This is necessary after merging dev into this branch. The screenshots still visually look the same but I am committing them as well in case there were any subtle changes due to this change in lighting behavior.
1 task
0b5vr
added a commit
to pixiv/three-vrm
that referenced
this pull request
Jan 10, 2024
Starting from r155, the light unit is set to physically based one by default. We need to multiply the directional light intensity by PI because of this change. See: mrdoob/three.js#26392
0b5vr
added a commit
to pixiv/three-vrm
that referenced
this pull request
Jan 15, 2024
Starting from r155, the light unit is set to physically based one by default. We need to multiply the directional light intensity by PI because of this change. See: mrdoob/three.js#26392
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related issue: #24975 and #25479
Description
This PR deprecates
WebGLRenderer.useLegacyLights. It also changes the default value tofalse.The motivation behind this change is to have a single lighting mode in the engine which allows for physically correct workflows. It will also make the switch to
WebGPURenderereasier since this renderer does not support a legacy lighting mode.Changing the default of
useLegacyLightswill affect all applications that still use the legacy workflow. For the upcoming months, users can set the property back totrueto restore the previous behavior. Since the property is deprecated, a migration to the new mode is required at some point. I think it's best if we provide a forum topic that explains the changes and how the migration tasks look like. The URL to this topic will be placed into the deprecation warnings.All light intensities are affected by this PR since the artist-friendly light intensity scaling factor is not used anymore. That means light intensities are decreased by factor
Math.PI. The behavior of spot and point lights (how they decay) also noticeably changes which has to be explained in the new guide.