# Enable and disable shadows based on condition

**URL:** <https://forums.unrealengine.com/t/enable-and-disable-shadows-based-on-condition/2271053>\
**Category:** Rendering\
**Tags:** unreal-engine, question\
**Created:** [January 11, 2025, 10:13am UTC](https://forums.unrealengine.com/t/enable-and-disable-shadows-based-on-condition/2271053 "2025-01-11T10:13:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![volumetrix](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@volumetrix](https://forums.unrealengine.com/u/volumetrix)\
**Post date:** [January 11, 2025, 10:13am UTC](https://forums.unrealengine.com/t/enable-and-disable-shadows-based-on-condition/2271053/1 "2025-01-11T10:13:41Z")

</div>

Is it possible to disable shadow map rendering for a light until the player is close to it (or some other condition is filled)?

For example, a series of street lamps with downward pointing cone lights. They should render pre-baked lighting information when the player is far but switch to dynamic shadows when the player is underneath. Ideally there would be only a single light rendering a shadow map at a given time but the whole rest of the street would have baked lighting information.

Can lighting and shadow map rendering be controlled this way?

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [January 11, 2025, 11:29am UTC](https://forums.unrealengine.com/t/enable-and-disable-shadows-based-on-condition/2271053/2 "2025-01-11T11:29:32Z")

</div>

This is what happens by default if you have used a **stationary** directional light. You can build light, but then set a dynamic threshold

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/2/5/825ebc465d38cb846e9379935dc6dacf5332d92f.png)

Up to this distance, the light will use dynamic shadows, but static beyond that.

I’m pretty sure that’s how it goes ( quite a while since I used static lighting ).

---

<div class="post-metadata">

**Author:** ![volumetrix](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@volumetrix](https://forums.unrealengine.com/u/volumetrix)\
**Post date:** [January 11, 2025, 2:06pm UTC](https://forums.unrealengine.com/t/enable-and-disable-shadows-based-on-condition/2271053/3 "2025-01-11T14:06:45Z")

</div>

Great, thank you!

Although this seems to only be available for directional light and not for spot and point lights.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [January 11, 2025, 3:29pm UTC](https://forums.unrealengine.com/t/enable-and-disable-shadows-based-on-condition/2271053/4 "2025-01-11T15:29:15Z")

</div>

That’s correct. I don’t think it’s implemented for positioned lights.
