Shadow display error issue

Maybe this post can help, at least to compute the position of the light and the minZ/maxZ properties:

You can disable the automatic calculation of the light frustum extents (light.autoUpdateExtends = false) and calculate the orthoLeft/orthoRight/orthoTop/orthoBottom properties yourself, based on the scene’s bounding box, but limiting the values if they are too high (to avoid losing precision in the shadow map). If you do this, you may not get shadows for the most distant objects, but there are trade-offs. You can also try using [cascading shadow maps] (Cascaded Shadow Maps | Babylon.js Documentation).

2 Likes