Skip to content

Conversation

@vincentfretin
Copy link
Contributor

In #5297 we changed to use renderer.useLegacyLights setter instead of the deprecated renderer.physicallyCorrectLights in three r150, and kept the physicallyCorrectLights property name for the renderer system for backward compatibility. The changelog in aframe 1.5.0 release is wrong about this change, it says the reverse, I fixed it in this PR.

In three r155, the useLegacyLights api was also deprecated, such giving this warning
THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733.

The warning is shown when you use the setter useLegacyLights.
Because useLegacyLights is false by default now in threejs, we should only set useLegacyLights to true if renderer="physicallyCorrectLights:false" which is still the default in aframe 1.5.0.
I thought we changed the default to match three decision, but we didn't do it for 1.5.0. useLegacyLights will probably be removed in r165, so aframe 1.6.0 will need to switch the default for sure.

I propose to not set useLegacyLights at all when we use renderer="physicallyCorrectLights:true" to remove this warning, this is what this PR does.

@dmarcos dmarcos merged commit d43ce42 into aframevr:master Nov 17, 2023
@dmarcos
Copy link
Member

dmarcos commented Nov 17, 2023

Thanks!

@vincentfretin vincentfretin deleted the useLegacyLights-warning branch November 17, 2023 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants