-
-
Notifications
You must be signed in to change notification settings - Fork 35.8k
CSM Shadow: How to toggle csm shadow #31183
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
Comments
Shadows should be toggled by changing the |
Ok,does it mean setting In my app, So when shadow is set from enabled to disabled, I try to set the |
Yes, this happens here, btw: three.js/src/nodes/lighting/AnalyticLightNode.js Lines 206 to 220 in b801c8f
|
You can test the changes of #31186 with |
Thanks for the update! I've tested the changes, and things work as expected so far👍. |
No, it won't. My comment just referred to the fact that |
Uh oh!
There was an error while loading. Please reload this page.
Description
(https://jsfiddle.net/ligaofeng0901/yqv21wtp/26/)
This is a modified version of offical example. if you click the toggle button to disable csm shadow, the shadow node can't be disposed, and the shadow is still here.
The main problem is the light node cann't detect the change of shadownode. And as I konw, there is no way to forcely update light. these code
light.needsUpdate = true;light.shadow.needsUpdate =true;light.shadow.shadowNode.needsUpdate = true;
all don't work.Solution
Provide a way to forcely update lightnode ?
Alternatives
Additional context
No response
The text was updated successfully, but these errors were encountered: