-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
Honor camera layers on light.shadow.camera for selective shadow #30156
Comments
any thoughts @Mugen87 ? |
Maybe if the shadowMap layer is different than default then we use shadow.camera.layer instead of camera.layer? |
You mean adding a layer property to light.shadow, and test this one to check if it isnt default it would then be used correct ? |
hey @Mugen87 Thanks a lot |
Is there currently no alternative to achieve selective shadows? I never had the use case for something like this hence I'm asking... We could introduce a boolean property in |
Description
In order to build a selective real time shadow along with a baked shadow system the light.shadow.camera should honor the layers to be tested against an object to render the shadow
I did add support on a custom build of the WebGLRenderer and this was very handy
Here an example disabling all the layers for the shadow camera but still renders :
Live Link
Solution
Before rendering the shadow, the mask is copied from the main render camera, wondering if this copy is mandatory, and if we could go with manually setting the layers instead for more controls, or maybe provide a solution to play with the shadow.camera layer without being overwritten :
three.js/src/nodes/lighting/ShadowNode.js
Line 659 in 672d77a
The text was updated successfully, but these errors were encountered: