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

[gltf] Implement KHR_lights options. #11551

Merged
merged 2 commits into from
Jun 23, 2017

Conversation

donmccurdy
Copy link
Collaborator

Implementing remaining options in KHR_lights. I am not sure whether quadratic attenuation is supported in three.js, so it is ignored with a warning here.

References:

/cc @takahirox

@donmccurdy
Copy link
Collaborator Author

Oh, I just found WebGLRenderer.physicallyCorrectLights, which appears to support quadratic attenuation? I'm not sure of the difference between quadraticAttenuation and fallOffExponent, and will look into that.

@mrdoob
Copy link
Owner

mrdoob commented Jun 19, 2017

/cc @bhouston

@donmccurdy
Copy link
Collaborator Author

Ok, I think this is fixed. With quadraticAttenuation=2 and renderer.physicallyCorrectLights=true, glTF models should have physically correct lighting.

The fallOffExponent corresponds to our old spotlight.exponent parameter; I'm logging a warning on that for now and suggesting that the glTF2 KHR_light extension use a penumbra angle instead.

@mrdoob mrdoob merged commit 7b81e51 into mrdoob:dev Jun 23, 2017
@mrdoob
Copy link
Owner

mrdoob commented Jun 23, 2017

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