# How do I fix spiky shadows in UE5 Preview 2

**URL:** <https://forums.unrealengine.com/t/how-do-i-fix-spiky-shadows-in-ue5-preview-2/510865>\
**Category:** Rendering\
**Tags:** Shadows, unreal-engine, UE5-0, Lighting, question\
**Created:** [March 30, 2022, 10:19am UTC](https://forums.unrealengine.com/t/how-do-i-fix-spiky-shadows-in-ue5-preview-2/510865 "2022-03-30T10:19:38Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martin\_11](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Martin\_11](https://forums.unrealengine.com/u/Martin_11)\
**Post date:** [March 30, 2022, 10:19am UTC](https://forums.unrealengine.com/t/how-do-i-fix-spiky-shadows-in-ue5-preview-2/510865/1 "2022-03-30T10:19:38Z")

</div>

Hey,  
For quite some time am I trying to fix those shadows, I tried multiple console commands and all different settings but couldn’t fix it. Whatever I do the shadows keep having those spikes.

sadly I cant use the Source Angle of my Direction Light because I use it as the sun in the render.  
the problem also doesn’t come from the Mesh since I also tried it with the standard cubes from unreal engine.

Is there any way how I can fix those Shadows?

 ![ecaed23668c1787e01da7d3e10dabcaf](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/f/4/8f4ae14b95b9307bb39f065895adb72076b80a26.jpeg)

---

<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:** [March 30, 2022, 10:51am UTC](https://forums.unrealengine.com/t/how-do-i-fix-spiky-shadows-in-ue5-preview-2/510865/2 "2022-03-30T10:51:27Z")

</div>

I think you’re using static lighting? In that case, it’s the lightmap density of the window sill.

An easy fix is to use a moveable directional light.

---

<div class="post-metadata">

**Author:** ![Martin\_11](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Martin\_11](https://forums.unrealengine.com/u/Martin_11)\
**Post date:** [March 30, 2022, 11:20am UTC](https://forums.unrealengine.com/t/how-do-i-fix-spiky-shadows-in-ue5-preview-2/510865/3 "2022-03-30T11:20:35Z")

</div>

the directional light is moveable but it still makes those shadows, unless I have to also change it other settings

 ![8b077747a310393cb3c5f4740902c481](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/4/7/a473b2a0a6b58215fc23495da237fff8b5505469.png)

---

<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:** [March 30, 2022, 11:51am UTC](https://forums.unrealengine.com/t/how-do-i-fix-spiky-shadows-in-ue5-preview-2/510865/4 "2022-03-30T11:51:29Z")

</div>

On default settings, it shouldn’t do this.

No other lights?

---

<div class="post-metadata">

**Author:** ![Martin\_11](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Martin\_11](https://forums.unrealengine.com/u/Martin_11)\
**Post date:** [March 30, 2022, 12:22pm UTC](https://forums.unrealengine.com/t/how-do-i-fix-spiky-shadows-in-ue5-preview-2/510865/5 "2022-03-30T12:22:07Z")

</div>

no, its the only light source apart from the sky light.

---

<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:** [March 30, 2022, 12:25pm UTC](https://forums.unrealengine.com/t/how-do-i-fix-spiky-shadows-in-ue5-preview-2/510865/6 "2022-03-30T12:25:53Z")

</div>

These two are just cubes, right?

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/c/4/8c43e30c86a9bec00414d45828f34e66bbd1f61d.jpeg)

What happens when you put a cube where the sill is?

---

<div class="post-metadata">

**Author:** ![Martin\_11](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Martin\_11](https://forums.unrealengine.com/u/Martin_11)\
**Post date:** [March 30, 2022, 12:30pm UTC](https://forums.unrealengine.com/t/how-do-i-fix-spiky-shadows-in-ue5-preview-2/510865/7 "2022-03-30T12:30:13Z")

</div>

ye, those are standard cubes from UE and no matter where I move them the shadow doesnt change, the reason why the first shadow is stronger then the other is because there is glass in between the cubes and the lower part of the window and the glass makes the shadow look stronger.

---

<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:** [March 30, 2022, 12:31pm UTC](https://forums.unrealengine.com/t/how-do-i-fix-spiky-shadows-in-ue5-preview-2/510865/8 "2022-03-30T12:31:52Z")

</div>

Mmm, could be something to do with refraction. Can you try changing the glass material?

---

<div class="post-metadata">

**Author:** ![Martin\_11](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Martin\_11](https://forums.unrealengine.com/u/Martin_11)\
**Post date:** [March 30, 2022, 12:35pm UTC](https://forums.unrealengine.com/t/how-do-i-fix-spiky-shadows-in-ue5-preview-2/510865/9 "2022-03-30T12:35:50Z")

</div>

I changed the glass material to a full transparent material but the shadows stay the same

---

<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:** [March 30, 2022, 12:41pm UTC](https://forums.unrealengine.com/t/how-do-i-fix-spiky-shadows-in-ue5-preview-2/510865/10 "2022-03-30T12:41:03Z")

</div>

Ok, now I’m suspecting virtual shadow maps. I think if you turn that off, it goes away…

---

<div class="post-metadata">

**Author:** ![Martin\_11](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Martin\_11](https://forums.unrealengine.com/u/Martin_11)\
**Post date:** [March 30, 2022, 12:51pm UTC](https://forums.unrealengine.com/t/how-do-i-fix-spiky-shadows-in-ue5-preview-2/510865/11 "2022-03-30T12:51:01Z")

</div>

ok, I changed it from virtual shadow maps to shadow maps, the shadows are a lot better now, just at some parts they look like they nearly completely disappeared but if there is not a better way I think that’s the best solution.  
ty a lot ^-^

---

<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:** [March 30, 2022, 12:51pm UTC](https://forums.unrealengine.com/t/how-do-i-fix-spiky-shadows-in-ue5-preview-2/510865/12 "2022-03-30T12:51:45Z")

</div>

It’s because the sun is low in the sky ( I think? ). Here’s a a thread about it:

> [@Jagged Shadow?](https://forums.unrealengine.com/t/jagged-shadow/232504):
>
> Hi, I’m pretty new to Unreal Engine, I was playing around with the lighting in UE 5 and I noticed these Jagged shadows and I don’t know how to fix them. So far I’ve tried to increase the source radius and it didn’t seem to change anything. I suspect it might be caused by nanite triangulations but it’s producing the same shadows on non-nanite objects as well. Please help, thanks!

---

<div class="post-metadata">

**Author:** ![Martin\_11](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Martin\_11](https://forums.unrealengine.com/u/Martin_11)\
**Post date:** [March 30, 2022, 12:52pm UTC](https://forums.unrealengine.com/t/how-do-i-fix-spiky-shadows-in-ue5-preview-2/510865/13 "2022-03-30T12:52:32Z")

</div>

ah ty a lot, i will check that out ^-^

---

<div class="post-metadata">

**Author:** ![jblackwell](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jblackwell](https://forums.unrealengine.com/u/jblackwell)\
**Post date:** [March 30, 2022, 11:06pm UTC](https://forums.unrealengine.com/t/how-do-i-fix-spiky-shadows-in-ue5-preview-2/510865/14 "2022-03-30T23:06:13Z")

</div>

Do you have ray-traced shadows available? If so, switch to those and it massively increases general shadow quality. VSMs have CVars that can correct aliasing and clipmap errors, but I don’t know them off the top of my head unfortunately.

---

<div class="post-metadata">

**Author:** ![ZacD](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ZacD](https://forums.unrealengine.com/u/ZacD)\
**Post date:** [March 31, 2022, 12:28am UTC](https://forums.unrealengine.com/t/how-do-i-fix-spiky-shadows-in-ue5-preview-2/510865/15 "2022-03-31T00:28:05Z")

</div>

You can try “r.Shadow.Virtual.ResolutionLodBiasDirectional” with -1 to -2 if you still want to use virtual shadow maps.

---

<div class="post-metadata">

**Author:** ![jblackwell](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jblackwell](https://forums.unrealengine.com/u/jblackwell)\
**Post date:** [April 3, 2022, 8:47pm UTC](https://forums.unrealengine.com/t/how-do-i-fix-spiky-shadows-in-ue5-preview-2/510865/16 "2022-04-03T20:47:00Z")

</div>

It might just be the shadow terminator problem, normal lighting not aligning with a lower-poly mesh, but I wouldn’t know without an example. Is it self-shadowing or shadow-casting, or both?

---

<div class="post-metadata">

**Author:** ![Vannys](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Vannys](https://forums.unrealengine.com/u/Vannys)\
**Post date:** [February 10, 2023, 1:45am UTC](https://forums.unrealengine.com/t/how-do-i-fix-spiky-shadows-in-ue5-preview-2/510865/17 "2023-02-10T01:45:37Z")

</div>

Not sure if you still have this problem but I may have a fix for anyone still struggling with it.

If you have a post process volume in your scene, change the Exposure Metering Mode to ‘Auto Exposure Histogram’. Then change the Exposure Compensation to suit.
