Hi! I’m trying to make our shadows update per mesh as a mesh gets clipped by the a clip plane.
Some things I’ve tried:
- I can achieve meshes getting clipped individually (by setting the scene’s clipPlane during onBeforeRenderObservable for each mesh and then setting the clipPlane as null onAfterRenderObservable). However, it doesn’t update shadows.
- I’ve found that for a single mesh, I can get the desired effect of the shadows updating, but the entire scene would be subject to the same clipping plane.
Any guidance on how to achieve shadows that update shadows while clipping each mesh individually? Here’s a link to the playground, that has comments to show the two things I tried: update shadows with clip plane | Babylon.js Playground (babylonjs-playground.com)
To clarify, I’d like to see the object and shadow get clipped/updated, without the bottom surface getting clipped.