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

RectAreaLightHelper: Ignore inherited scale factors #21848

Merged
merged 1 commit into from
May 27, 2021

Conversation

WestLangley
Copy link
Collaborator

RectAreaLights are sized by light.width and light.height, and ignore any inherited scaling from the scene graph.

Typically, lights are not scaled, but a light could be a child of a scaled object.

This PR ensures that RectAreaLightHelper ignores inherited scaling, too, and renders the area light in its specified size.

@WestLangley WestLangley added this to the r129 milestone May 17, 2021
@WestLangley WestLangley changed the title RectAreaLightHelper: Ignore any inherited scale factors RectAreaLightHelper: Ignore inherited scale factors May 17, 2021
@WestLangley
Copy link
Collaborator Author

Related issue:

DirectionalLightHelper's so-called "handle" is affected by world scale, but there is a scale parameter in the helper constructor that can offset that.

@WestLangley
Copy link
Collaborator Author

The glTF spec says

The light's transform is affected by the node's world scale, but all properties of the light (such as range and intensity) are unaffected.

Similarly, in three.js, the size of the rect area light is not affected by the world scale.

@mrdoob mrdoob merged commit 3c16ded into mrdoob:dev May 27, 2021
@mrdoob
Copy link
Owner

mrdoob commented May 27, 2021

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.

3 participants