# Shadows is too expensive

**URL:** <https://forums.unrealengine.com/t/shadows-is-too-expensive/324762>\
**Category:** Debugging, Optimization, & Profiling\
**Tags:** profiling, cast-shadow, unreal-engine, slow, Lighting, question\
**Created:** [July 10, 2015, 2:03pm UTC](https://forums.unrealengine.com/t/shadows-is-too-expensive/324762 "2015-07-10T14:03:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mdeni](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mdeni](https://forums.unrealengine.com/u/mdeni)\
**Post date:** [July 10, 2015, 2:03pm UTC](https://forums.unrealengine.com/t/shadows-is-too-expensive/324762/1 "2015-07-10T14:03:21Z")

</div>

Hi all!

One question about shadows. I have one directional light in my scene, and it is configured as “stationary”. I have many objects, that can cast shadows. Scene is look like this:

 ![scene](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/2/6/826a045d0df64a7d5b8aaefe2afd914c148fce30.png)

GPU Profiler shows that a lot of time spent in the shadow casting. Every object take 0.1-0.2 ms for casting shadow.

 ![scene](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/d/6/7d6566ab8e177902f6816a16600653b7e988bf73.png)

Is it normal situation? Is there way to optimize shadow casting? I repeat I have only one light source. By the way, I have disabled Preshadows. Don’t understand what is this, but it takes too many time too 🙂

Hope for your help!

---

<div class="post-metadata">

**Author:** ![mdeni](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@mdeni](https://forums.unrealengine.com/u/mdeni)\
**Post date:** [July 13, 2015, 12:37pm UTC](https://forums.unrealengine.com/t/shadows-is-too-expensive/324762/2 "2015-07-13T12:37:40Z")

</div>

I got some answers on the forum. Maybe they will be of interest to you.

> **[Shadows is too expensive.](https://forums.unrealengine.com/showthread.php?75875-Shadows-is-too-expensive&p=331066)**
>
> Hi all! One question about shadows. I have one directional light in my scene, and it is configured as “stationary”. I have many objects, that can cast shadows. Scene is look like this: GPU Profiler shows that a...

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_5955ea44](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_5955ea44](https://forums.unrealengine.com/u/anonymous_user_5955ea44)\
**Post date:** [October 23, 2015, 12:45am UTC](https://forums.unrealengine.com/t/shadows-is-too-expensive/324762/3 "2015-10-23T00:45:46Z")

</div>

Are your objects stationary or movable?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_4e75d603](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_4e75d603](https://forums.unrealengine.com/u/anonymous_user_4e75d603)\
**Post date:** [October 24, 2015, 12:27pm UTC](https://forums.unrealengine.com/t/shadows-is-too-expensive/324762/4 "2015-10-24T12:27:25Z")

</div>

On your dynamic light try to play with the settings under Cascaded shadow maps, especially Dynamic Shadow Distance Stationary
