Directional light frustum

Hi,

I’m trying to set a custom frustom size for my directional light shadow but the DirectionalLightFrustumViewer/Helper and the shadow breaks: https://playground.babylonjs.com/#2898XM#11

I have followed the documentation: “You can set this property to false and set the frustum sizes manually by updating the orthoLeft , orthoRight , orthoTop and orthoBottom properties. You can use the shadowFrustumSize property instead if you want to set the frustum with a fixed size in all dimensions.”

Thanks for any help

Huh, strange. It might be a bug or maybe we just need to update the documentation :stuck_out_tongue: @Evgeni_Popov could you take a look?

You basically create a single point as the light frustum as you used the same value for all the orthoXXX properties.

Try something like this:
https://playground.babylonjs.com/#2898XM#12

4 Likes

Ah, makes sense. Thanks a lot for the quick help!