# ShadowDepths in GPU visualizer hurting performance

**URL:** <https://forums.unrealengine.com/t/shadowdepths-in-gpu-visualizer-hurting-performance/73584>\
**Category:** Rendering\
**Tags:** unreal-engine\
**Created:** [September 14, 2016, 2:35am UTC](https://forums.unrealengine.com/t/shadowdepths-in-gpu-visualizer-hurting-performance/73584 "2016-09-14T02:35:14Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![axios714](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/axios714/32/88717_2.png) [@axios714](https://forums.unrealengine.com/u/axios714)\
**Post date:** [September 14, 2016, 2:35am UTC](https://forums.unrealengine.com/t/shadowdepths-in-gpu-visualizer-hurting-performance/73584/1 "2016-09-14T02:35:14Z")

</div>

Hi-running through some of the GPU profiler stats and I am noticing in several parts of my scene that “ShadowDepths” are taking 6-7ms to calculate. My scene is running at about 75fps with about 17ms, so this is playing a large role is the high response time. The scene is a courtyard with foliage. Materials do include subsurface scattering and I have CSM on the directional light. Are these responsible? In general where can I find more information on each variable listed in the profiler?

---

<div class="post-metadata">

**Author:** ![jonimake](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jonimake](https://forums.unrealengine.com/u/jonimake)\
**Post date:** [September 14, 2016, 6:59am UTC](https://forums.unrealengine.com/t/shadowdepths-in-gpu-visualizer-hurting-performance/73584/2 "2016-09-14T06:59:08Z")

</div>

Shadow depths is basically dynamic shadowmap rendering. If it’s taking too long you might need to turn off shadow casting on some meshes that don’t have that noticeable shadows in the first place.

---

<div class="post-metadata">

**Author:** ![6r0m](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/6r0m/32/1194563_2.png) [@6r0m](https://forums.unrealengine.com/u/6r0m)\
**Post date:** [April 18, 2017, 8:57am UTC](https://forums.unrealengine.com/t/shadowdepths-in-gpu-visualizer-hurting-performance/73584/3 "2017-04-18T08:57:59Z")

</div>

I have movable only char but [Alis\_0\_1\_4 - Unreal Editor (190 kb) закачан 18 апреля 2017 г. Joxi](http://joxi.ru/nAyzd49FYWbWor)

ps: ohh It’s because I didn’t bake all object on the scene(

---

<div class="post-metadata">

**Author:** ![Oskar\_Swierad](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/oskar_swierad/32/465778_2.png) [@Oskar\_Swierad](https://forums.unrealengine.com/u/Oskar_Swierad)\
**Post date:** [June 6, 2017, 7:19pm UTC](https://forums.unrealengine.com/t/shadowdepths-in-gpu-visualizer-hurting-performance/73584/4 "2017-06-06T19:19:29Z")

</div>

“ShadowDepths”: generation of shadow depth maps. It’s independent of the game resolution. Depends purely on the amount of shadow-casting lights in your scene, the geometry they have on it’s way (that casts shadows). The quality settings also matter.

I explain it in my vid: [UE4 Graphics Profiling: All Categories Guide (Rendering Passes) - YouTube](https://youtu.be/C3lumWdwHmA?t=1009)

 ![shadowDepths.png](https://d3kjluh73b9h9o.cloudfront.net/original/3X/a/a/aa0536a090a62258a455d4c277e5dfa3ee36e440.png)

---

<div class="post-metadata">

**Author:** ![Haoris](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Haoris](https://forums.unrealengine.com/u/Haoris)\
**Post date:** [September 30, 2020, 11:40pm UTC](https://forums.unrealengine.com/t/shadowdepths-in-gpu-visualizer-hurting-performance/73584/5 "2020-09-30T23:40:54Z")

</div>

I still don’t understand how ShadowDepths works. I’m working on an open world game, using only one movable directional light for sun shadows (no other light)  
CSM distance is set to 10k (lower means less FPS !?), using 2 cascades (3 or 4 cascades decrease framerate by 2 or 3 fps).  
CSM resolution is decreased to 1024.  
Only shadow casting meshes are some trees, bushes and really few rocks (shadows disable for grass/flowers and other foliage. Looks ugly but trying to optimize framerate)  
All shadow casting meshes use agressive LODs and billboards  
Shadow quality set to medium (low setting removes all shadow)  
Compiled game running in 720p still has ~15ms of ShadowDepths

---

<div class="post-metadata">

**Author:** ![Haoris](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Haoris](https://forums.unrealengine.com/u/Haoris)\
**Post date:** [October 2, 2020, 12:02am UTC](https://forums.unrealengine.com/t/shadowdepths-in-gpu-visualizer-hurting-performance/73584/6 "2020-10-02T00:02:51Z")

</div>

> [@anonymous\_user\_5d2d3469](#):
>
> Dont necro, also, what are your specs?

This is a game dev forum, not a gaming forum.

---

<div class="post-metadata">

**Author:** ![Chosker](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/chosker/32/710746_2.png) [@Chosker](https://forums.unrealengine.com/u/Chosker)\
**Post date:** [October 4, 2020, 7:43am UTC](https://forums.unrealengine.com/t/shadowdepths-in-gpu-visualizer-hurting-performance/73584/7 "2020-10-04T07:43:53Z")

</div>

> [@Haoris](#):
>
> CSM distance is set to 10k (lower means less FPS !?)

no, lower means “more FPS”  
CSM distance is how far (from the camera) objects cast shadows. more objects = less FPS.

---

<div class="post-metadata">

**Author:** ![Haoris](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Haoris](https://forums.unrealengine.com/u/Haoris)\
**Post date:** [October 4, 2020, 12:14pm UTC](https://forums.unrealengine.com/t/shadowdepths-in-gpu-visualizer-hurting-performance/73584/8 "2020-10-04T12:14:32Z")

</div>

> [@Chosker](#):
>
> no, lower means “more FPS”  
> CSM distance is how far (from the camera) objects cast shadows. more objects = less FPS.

Yes, it should means more framerate but that’s not what I get. 20k is slightly faster (by 3-4 fps) than 10k. Maybe because cascades are more stretched at 20k than 10k

---

<div class="post-metadata">

**Author:** ![Spoondog](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Spoondog](https://forums.unrealengine.com/u/Spoondog)\
**Post date:** [February 17, 2021, 12:47am UTC](https://forums.unrealengine.com/t/shadowdepths-in-gpu-visualizer-hurting-performance/73584/9 "2021-02-17T00:47:35Z")

</div>

> [@Haoris](#):
>
> Yes, it should means more framerate but that’s not what I get. 20k is slightly faster (by 3-4 fps) than 10k.

Old thread but I wonder if you had Distance Field shadowing enabled? (happens outside the cascaded shadow radius) If you did, I’ve noticed (depending on the view) these can be slower than the cascaded shadows. That’s one thing that could explain it getting slower when you reduce the distance. The only other thing I can think of is lighting wasn’t built.

---

<div class="post-metadata">

**Author:** ![Haoris](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Haoris](https://forums.unrealengine.com/u/Haoris)\
**Post date:** [February 20, 2021, 10:20pm UTC](https://forums.unrealengine.com/t/shadowdepths-in-gpu-visualizer-hurting-performance/73584/10 "2021-02-20T22:20:09Z")

</div>

> [@Spoondog](#):
>
> Old thread but I wonder if you had Distance Field shadowing enabled? (happens outside the cascaded shadow radius) If you did, I’ve noticed (depending on the view) these can be slower than the cascaded shadows. That’s one thing that could explain it getting slower when you reduce the distance. The only other thing I can think of is lighting wasn’t built.

Maybe I’m wrong but I think that the distance field shadows cost goes into “ShadowProjection”, not “ShadowDepths”. The problem only comes from Shadow Depths and I’ve found out that it comes from the landscape

---

<div class="post-metadata">

**Author:** ![Spoondog](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Spoondog](https://forums.unrealengine.com/u/Spoondog)\
**Post date:** [February 21, 2021, 12:31am UTC](https://forums.unrealengine.com/t/shadowdepths-in-gpu-visualizer-hurting-performance/73584/11 "2021-02-21T00:31:43Z")

</div>

> [@Haoris](#):
>
> Maybe I’m wrong but I think that the distance field shadows cost goes into “ShadowProjection”, not “ShadowDepths”. The problem only comes from Shadow Depths and I’ve found out that it comes from the landscape

Yes you’re right about where the cost goes, it looked like you had changed to talking about overall FPS.  
Ah yes the landscape does make sense I suppose, rendering large expensive components into all cascades instead of just one. For the benefit of others who find this thread, presume you tried reducing your component size on the landscape after discovering that? (Or just turn shadowcasting off on the landscape components that don’t need it)

---

<div class="post-metadata">

**Author:** ![GPX](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@GPX](https://forums.unrealengine.com/u/GPX)\
**Post date:** [January 17, 2022, 12:55pm UTC](https://forums.unrealengine.com/t/shadowdepths-in-gpu-visualizer-hurting-performance/73584/12 "2022-01-17T12:55:27Z")

</div>

To **SOLVE** it u need make large landscape or put plan under your map and make it biggar than your landscape and set cast shadow off  
The reason to do it  
The shadow try to reach point but no point to reash it except sky sphere and its soo far thats make fps low  
U can try if you look to same direction of sun you will lose performance and if you look to sun you have good performance cuz no shadow loost there  
Sorry my English so bad lol  
i hope this help you

---

<div class="post-metadata">

**Author:** ![Bravoebello](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/bravoebello/32/1017916_2.png) [@Bravoebello](https://forums.unrealengine.com/u/Bravoebello)\
**Post date:** [December 1, 2025, 7:02pm UTC](https://forums.unrealengine.com/t/shadowdepths-in-gpu-visualizer-hurting-performance/73584/13 "2025-12-01T19:02:52Z")

</div>

Another useful tip:  
If you’re using **Nanite foliage with WPO (World Position Offset)** to simulate wind and you’re seeing **high costs in Shadow Depth** , look for the setting **“Shadow Cache Invalidation Behavior”** in your foliage/mesh details and set it to **Rigid** (the default is _Auto_).

What this does is prevent the foliage shadows from being invalidated and recalculated every few seconds.  
The result is a **noticeable performance boost** , especially in dense foliage scenes.

The trade-off is that shadows from dynamic lights (like the sun) will no longer update smoothly as the foliage moves. Instead, they may “snap” when the light changes position, rather than transition smoothly.

---

<div class="post-metadata">

**Author:** ![Narg666](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/narg666/32/870597_2.png) [@Narg666](https://forums.unrealengine.com/u/Narg666)\
**Post date:** [December 24, 2025, 5:34am UTC](https://forums.unrealengine.com/t/shadowdepths-in-gpu-visualizer-hurting-performance/73584/14 "2025-12-24T05:34:38Z")

</div>

I just tested this and it worked!! I thought “no way this is true”; but it does work!! At least in 5.4
