-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
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
glTF KHR_lights update #13340
glTF KHR_lights update #13340
Conversation
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.
Thanks, looks good! There are some merge conflicts in various pages though, you may want to cherrypick this to a new branch or rebase.
I believe it will also be necessary to set:
renderer.physicallyCorrectLights = true;
... to ensure that color * intensity
is interpreted as luminous intensity measured in candela.
For now I think we should consider this WIP for testing, and only merge when the KHR_lights spec is nearer to converging.
// Handle spotlight properties. | ||
var spot = light.spot || {}; | ||
var innerConeAngle = spot.innerConeAngle ? spot.innerConeAngle : 0; | ||
var outerConeAngle = spot.outerConeAngle || Math.PI / 4.0; |
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.
Nit: for consistency with other code here, I would write:
var innerConeAngle = spot.innerConeAngle !== undefined ? spot.innerConeAngle : 0;
var outerConeAngle = spot.outerConeAngle !== undefined ? spot.outerConeAngle : Math.PI / 4.0;
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.
Will do.
Also opening a new pull request to clean up the PR.
Closing to open a clean pull request without conflicts. |
Updated to match current spec.
KhronosGroup/glTF#1223