# UDK/UE3 trees shadow/lighting flicker

**URL:** <https://forums.unrealengine.com/t/udk-ue3-trees-shadow-lighting-flicker/1199117>\
**Category:** UDK Content Creation and Design\
**Tags:** unreal-engine\
**Created:** [June 14, 2023, 3:41pm UTC](https://forums.unrealengine.com/t/udk-ue3-trees-shadow-lighting-flicker/1199117 "2023-06-14T15:41:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nathaniel3W](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nathaniel3W](https://forums.unrealengine.com/u/Nathaniel3W)\
**Post date:** [June 14, 2023, 3:41pm UTC](https://forums.unrealengine.com/t/udk-ue3-trees-shadow-lighting-flicker/1199117/1 "2023-06-14T15:41:40Z")

</div>

I have some trees that cast shadows on the ground and on themselves. Their lighting/shadowing flickers when the camera moves. When the camera stops moving, they’ll stop flickering after a second or two. It looks really bad. What can I do to prevent them from flickering?

---

<div class="post-metadata">

**Author:** ![Nathaniel3W](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nathaniel3W](https://forums.unrealengine.com/u/Nathaniel3W)\
**Post date:** [June 14, 2023, 5:02pm UTC](https://forums.unrealengine.com/t/udk-ue3-trees-shadow-lighting-flicker/1199117/2 "2023-06-14T17:02:11Z")

</div>

[https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/5/e/05e532f97f7379910efcf8fc391808e22b944248.mp4](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/5/e/05e532f97f7379910efcf8fc391808e22b944248.mp4)

---

<div class="post-metadata">

**Author:** ![Nathaniel3W](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nathaniel3W](https://forums.unrealengine.com/u/Nathaniel3W)\
**Post date:** [June 15, 2023, 4:24am UTC](https://forums.unrealengine.com/t/udk-ue3-trees-shadow-lighting-flicker/1199117/3 "2023-06-15T04:24:12Z")

</div>

I’ve narrowed down the problem to how the see-through leaves work. I have a screen-space effect that pokes extra holes into the transparency mask if the leaves are in the center of the screen, and if the pixel depth is under a certain threshold.

If I use pixel depth, then the shadows are permanently off and there’s no flickering. If I get distance between camera location and world location, then the shadows are on, but they flicker. I think the engine can’t decide whether to cast shadows or not.

---

<div class="post-metadata">

**Author:** ![Keehoon\_Ahn](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/keehoon_ahn/32/1194498_2.png) [@Keehoon\_Ahn](https://forums.unrealengine.com/u/Keehoon_Ahn)\
**Post date:** [June 15, 2023, 7:11am UTC](https://forums.unrealengine.com/t/udk-ue3-trees-shadow-lighting-flicker/1199117/4 "2023-06-15T07:11:17Z")

</div>

If something like that happened in my game, I would solve it by baking the lightmap.

---

<div class="post-metadata">

**Author:** ![Nathaniel3W](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Nathaniel3W](https://forums.unrealengine.com/u/Nathaniel3W)\
**Post date:** [June 15, 2023, 7:16am UTC](https://forums.unrealengine.com/t/udk-ue3-trees-shadow-lighting-flicker/1199117/5 "2023-06-15T07:16:49Z")

</div>

That was what I thought at first too. But my game has all dynamic lights. Maybe I need to replace the dynamic lights wherever possible (especially with the directional light). I think I may have found a solution though, by carefully tweaking the parameters on the material. Hopefully I can make that work.

---

<div class="post-metadata">

**Author:** ![unityafise](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@unityafise](https://forums.unrealengine.com/u/unityafise)\
**Post date:** [February 24, 2026, 6:42am UTC](https://forums.unrealengine.com/t/udk-ue3-trees-shadow-lighting-flicker/1199117/6 "2026-02-24T06:42:50Z")

</div>

Hi. Did you fin a solution for the problem? I am facing the same problem
