-
-
Notifications
You must be signed in to change notification settings - Fork 35.8k
Lights: Add shadowLimit property to PointLightShadow and SpotLightShadow #27345
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
base: dev
Are you sure you want to change the base?
Conversation
Co-authored-by: Michael Herzog <[email protected]>
📦 Bundle sizeFull ESM build, minified and gzipped.
🌳 Bundle size after tree-shakingMinimal build including a renderer, camera, empty scene, and dependencies.
|
I hesitated a bit with approving the PR since we have always stated users can directly modify the shadow camera's frustum. However, when we started to evaluate the The alternative would be to completely remove the |
Understandable. I'll leave that decision to you and the rest of the maintainers of this project. Totally fine with scrapping this PR if we end up going down another route |
see #27722 (comment) |
I can document the new property when we agree on this design. After trying out different approaches, it's the best solution for #27290 , imo. |
Hmm... I'll look into this one tomorrow. |
I am inclined to think this approach gets away from the original intent of making the lights "just work". See the discussion here. |
@WestLangley What alternative approach would you suggest? Something like #27290 (comment)? |
Fixed #27290
Description
Setting the distance of
PointLight
/SpotLight
affect thePointLightShadow
/SpotLightShadow
'scamera.far
when the distance is set to 0. If I set the distance to 5 and then later to 0, thecamera.far
of the Shadow is still set to 5. This change introduces ashadowLimit
property to the Shadow class that will be used to set the value ofcamera.far
when the corresponding light object is 0