frustumEdgeFalloff with cascaded shadow not work

Hey, babylon.js forum guys.

In the demo, I create the cascaded shadow in the scene and set frustumEdgeFalloff. Then rotate the camera at certain angles, the shadow will disappear.

How to make the shadow consistent when rotate the camera or move the camera?

cc @Evgeni_Popov

You must set a sensible camera.maxZ value for CSM to work as expected:


1 Like

Thx for you reply, set frustumEdgeFalloff then zoom in camera will cause the shadow flashing, seems affected by the camera radius, is that normal?

frustumEdgeFalloff is not supported for CSM, as it will apply to each cascade. By default, the shadows are clipped at camera.maxZ, but you can use the csm.shadowMaxZ property to clamp before this limit (without falloff, though).