Skip to content
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

Core: Remove artist-friendly factor of PI from shaders #22393

Merged
merged 1 commit into from
Aug 23, 2021

Conversation

WestLangley
Copy link
Collaborator

This PR removes the artist-friendly factor of PI from the shaders, and moves it into the renderer, instead.

Now, the factor is computed once per frame instead of once per fragment.

Previously, MeshLambertMaterial ignored the .physicallyCorrectLights flag, so when the flag was set, MeshLambertMaterial rendered more brightly than MeshPhongMaterial by a factor of PI.

Only users who use MeshLambertMaterial while setting the .physicallyCorrectLights flag to true will see a change.

@WestLangley WestLangley added this to the r132 milestone Aug 23, 2021
@WestLangley
Copy link
Collaborator Author

Instead, we probably should have had a different flag -- something like "Artist-Friendly Lights". Such a flag would be true by default.

Setting the .physicallyCorrectLights flag to true is not sufficient to make the lights physically-correct, anyway. The light .decay must be set to 2, world units must be in meters, and then light intensities must be specified in the proper units.

@mrdoob
Copy link
Owner

mrdoob commented Aug 23, 2021

So much nicer! 😍

@mrdoob mrdoob merged commit bd67e49 into mrdoob:dev Aug 23, 2021
@mrdoob
Copy link
Owner

mrdoob commented Aug 23, 2021

Many thanks!

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