Enable and disable shadows based on condition

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?

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

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 ).

1 Like

Great, thank you!

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

1 Like

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