# Light Frustum Size is Dynamic?

**URL:** <https://forum.babylonjs.com/t/light-frustum-size-is-dynamic/41587>\
**Category:** Questions\
**Tags:** shadows, light, light-frustum\
**Created:** [June 13, 2023, 6:27pm UTC](https://forum.babylonjs.com/t/light-frustum-size-is-dynamic/41587 "2023-06-13T18:27:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![arcman7](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/arcman7/32/20249_2.png) [@arcman7](https://forum.babylonjs.com/u/arcman7)\
**Post date:** [June 13, 2023, 6:27pm UTC](https://forum.babylonjs.com/t/light-frustum-size-is-dynamic/41587/1 "2023-06-13T18:27:24Z")

</div>

For a scene generating shadows from a single light source, the light frustum seems to change it’s size dynamically based on the largest area that contains all used shadow casters for the given light. Is that correct?

So in order to get the light frustum to always cover the entire area of the scene we care about, we would need to place 4 dummy object shadow casters at the 4 corners of the area - is that the best way to achieve this?

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [June 14, 2023, 9:20am UTC](https://forum.babylonjs.com/t/light-frustum-size-is-dynamic/41587/2 "2023-06-14T09:20:00Z")

</div>

Yes, the frustum size is automatically calculated for x/y dimensions because `DirectionalLight.autoUpdateExtends = true` by default. You can set this value to `false` and set the `orthoLeft` / `orthoRight` / `orthoTop` / `orthoBottom` properties manually. Performance will be better this way if you know the dimensions of the frustum.

Note that the size in dimension Z can also be calculated automatically if `autoCalcShadowZBounds = true`, but this is `false` by default. The properties to set for the Z dimension are `shadowMinZ` and `shadowMaxZ`.

---

<div class="post-metadata">

**Author:** ![arcman7](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/arcman7/32/20249_2.png) [@arcman7](https://forum.babylonjs.com/u/arcman7)\
**Post date:** [June 15, 2023, 9:08pm UTC](https://forum.babylonjs.com/t/light-frustum-size-is-dynamic/41587/3 "2023-06-15T21:08:38Z")

</div>

Thank you @Evgeni_Popov !
