# UE4 4.9 - cast modulated shadows causes flickering on IOS dynamic characters

**URL:** <https://forums.unrealengine.com/t/ue4-4-9-cast-modulated-shadows-causes-flickering-on-ios-dynamic-characters/331609>\
**Category:** Rendering\
**Tags:** Shadows, Mobile, UE4-9, unreal-engine, flickering, iOS, question\
**Created:** [September 9, 2015, 7:56pm UTC](https://forums.unrealengine.com/t/ue4-4-9-cast-modulated-shadows-causes-flickering-on-ios-dynamic-characters/331609 "2015-09-09T19:56:24Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![TiniestBiscuits](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TiniestBiscuits](https://forums.unrealengine.com/u/TiniestBiscuits)\
**Post date:** [September 9, 2015, 7:56pm UTC](https://forums.unrealengine.com/t/ue4-4-9-cast-modulated-shadows-causes-flickering-on-ios-dynamic-characters/331609/1 "2015-09-09T19:56:24Z")

</div>

I’m using UE4 4.9 for mobile IOS. The shadows flicker on certain characters (but not all, despite all having the same options selected) when playing on IOS. It appears fine in editor/play. It resembles z-fighting but there is only one mesh.

I am using a stationary directional light with “cast modular shadows” option checked on. The characters have Cast Shadow and Dynamic Shadow checked on. I have attempted to package with Dynamic Shadow checked and unchecked without change in shadow flickering.

The Modulated Shadows settings are Min Rough: 1, Shadow Bias: 0, Shadow Filter Sharpen: 0. I have tried playing with those settings as well with no change in flickering.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_cc69b907](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_cc69b907](https://forums.unrealengine.com/u/anonymous_user_cc69b907)\
**Post date:** [September 14, 2015, 6:13pm UTC](https://forums.unrealengine.com/t/ue4-4-9-cast-modulated-shadows-causes-flickering-on-ios-dynamic-characters/331609/2 "2015-09-14T18:13:22Z")

</div>

Hello Anngelica,

I am sorry you having this issue.

From what you describe you have a project set for mobile IOS device. On certain characters you see a flickering shadow that resembles Z-fighting. This only occurs when you play in mobile preview but not in editor/play.

This is because this action invalidates the precalculated lighting. If the lighting was rebuilt after the change then it would work as expected.  
In deferred rendering this action causes the lighting system to revert back to dynamic preview lighting (falling back to movable lighting). That path is not currently supported by the forward renderer.

Devices that do not support depth fetch in shader (iPhone4, etc) will not even try to render decals and modulated shadows.

So if the device that you are trying to package to does not support depth fetch it won’t even try and render.

What device are you attempting to package to?

If you have not built lighting before changing from Stationary to Movable and the other way respectively then the shadows will be invalidated and not render correctly.

Here is a link to what is supported on what devices.

> **[Development Requirements](https://docs.unrealengine.com/5.1/en-US/ios-ipados-and-tvos-development-requirements-for-unreal-engine/)**
>
> iOS development requirements including compatible hardware, software, and SDK information.

This is an updated list :

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — https://unrealcommunity.wiki/! You will be able to find content from...

This is our list on performance for IOS :

> **[Performance Guidelines for Mobile Devices](https://docs.unrealengine.com/5.1/en-US/performance-guidelines-for-mobile-devices-in-unreal-engine/)**
>
> Optimizing content and features for mobile games.

After looking through our documentation and determining if there is a compatibility issue, please post again with what you have found.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_cc69b907](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_cc69b907](https://forums.unrealengine.com/u/anonymous_user_cc69b907)\
**Post date:** [September 15, 2015, 3:20pm UTC](https://forums.unrealengine.com/t/ue4-4-9-cast-modulated-shadows-causes-flickering-on-ios-dynamic-characters/331609/3 "2015-09-15T15:20:03Z")

</div>

Hello Angelica,

I was wondering if you were still having this issue? Also, have you had a chance to look into the above mentioned troubleshoots?

Thank you,

---

<div class="post-metadata">

**Author:** ![TiniestBiscuits](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@TiniestBiscuits](https://forums.unrealengine.com/u/TiniestBiscuits)\
**Post date:** [September 15, 2015, 3:33pm UTC](https://forums.unrealengine.com/t/ue4-4-9-cast-modulated-shadows-causes-flickering-on-ios-dynamic-characters/331609/4 "2015-09-15T15:33:56Z")

</div>

Hi ,

Thank you so much for responding!

The issue is occurring on the iPad Air and iPad Air 2. We aren’t sure if depth fetch in shader is supported on it and are trying to find out.

I’m sorry but I’m not sure I understand the build lighting suggestions. I build lighting as stationary prior to packaging the project and the flickering occurs. I have not changed the light type - it is stationary and needs to remain stationary, so will I have to change it to something else and build first?

I probably should’ve used the term ‘dynamic’ in the title of this question instead of ‘movable’, sorry about that. Edited.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_cc69b907](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_cc69b907](https://forums.unrealengine.com/u/anonymous_user_cc69b907)\
**Post date:** [September 15, 2015, 3:46pm UTC](https://forums.unrealengine.com/t/ue4-4-9-cast-modulated-shadows-causes-flickering-on-ios-dynamic-characters/331609/5 "2015-09-15T15:46:54Z")

</div>

Hello Anngelica,

So, Stationary and Static lighting require a build to calculate how the lights will be calculated inside of your scene. As long as you are building with Stationary before packaging you should be fine.

I was just running down a list of possible troubleshoots.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_cc69b907](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_cc69b907](https://forums.unrealengine.com/u/anonymous_user_cc69b907)\
**Post date:** [September 16, 2015, 6:23pm UTC](https://forums.unrealengine.com/t/ue4-4-9-cast-modulated-shadows-causes-flickering-on-ios-dynamic-characters/331609/6 "2015-09-16T18:23:43Z")

</div>

Hello Anngelica,

I have a question. If you switch your lights to dynamic and then launch to the iPad Air does this fix the issue? Also have you had a chance to check if depth fetch is supported?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_ef298715](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_ef298715](https://forums.unrealengine.com/u/anonymous_user_ef298715)\
**Post date:** [December 7, 2015, 2:28am UTC](https://forums.unrealengine.com/t/ue4-4-9-cast-modulated-shadows-causes-flickering-on-ios-dynamic-characters/331609/7 "2015-12-07T02:28:20Z")

</div>

Hello, thanks for this post.

My company is having the same problem with these severe shadow flickering on characters in 4.9 when played on iPad air 2.

Do you know if this has been fixed in 4.10?

Thank you!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_cc69b907](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_cc69b907](https://forums.unrealengine.com/u/anonymous_user_cc69b907)\
**Post date:** [December 7, 2015, 3:00pm UTC](https://forums.unrealengine.com/t/ue4-4-9-cast-modulated-shadows-causes-flickering-on-ios-dynamic-characters/331609/8 "2015-12-07T15:00:08Z")

</div>

Hello NoaScape,

If you would please post a separate thread with your issue and all information that could be relevant to your project and what you see happening when you launch to the iPad air 2. Also if you would include screenshots and reproduction steps leading up to when you first noticed your shadows flickering. Lastly, if you would post a link to that thread here. I will then assign myself to that issue.

Thank you,

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_ef298715](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_ef298715](https://forums.unrealengine.com/u/anonymous_user_ef298715)\
**Post date:** [December 8, 2015, 1:21am UTC](https://forums.unrealengine.com/t/ue4-4-9-cast-modulated-shadows-causes-flickering-on-ios-dynamic-characters/331609/9 "2015-12-08T01:21:44Z")

</div>

Thank you for your reply, .  
I will get some screen shots of some simple assets and start a new thread as you indicated.

Much appreciated!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_ef298715](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_ef298715](https://forums.unrealengine.com/u/anonymous_user_ef298715)\
**Post date:** [December 8, 2015, 10:09am UTC](https://forums.unrealengine.com/t/ue4-4-9-cast-modulated-shadows-causes-flickering-on-ios-dynamic-characters/331609/10 "2015-12-08T10:09:58Z")

</div>

We did a test, and discovered that the shadows on the characters seem to look clean on iPad when the character is very close to a mesh which is casting shadows, but the shadows become jittery as they get further from the mesh.  
I will create a proper thread tomorrow.  
Thank you!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_ef298715](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_ef298715](https://forums.unrealengine.com/u/anonymous_user_ef298715)\
**Post date:** [December 9, 2015, 6:46am UTC](https://forums.unrealengine.com/t/ue4-4-9-cast-modulated-shadows-causes-flickering-on-ios-dynamic-characters/331609/11 "2015-12-09T06:46:16Z")

</div>

We are going to double check a couple more things before posting a new thread. Thank you!

---

<div class="post-metadata">

**Author:** ![Puyak](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Puyak](https://forums.unrealengine.com/u/Puyak)\
**Post date:** [December 13, 2015, 11:31pm UTC](https://forums.unrealengine.com/t/ue4-4-9-cast-modulated-shadows-causes-flickering-on-ios-dynamic-characters/331609/12 "2015-12-13T23:31:41Z")

</div>

Just wanted to mention that I had the same issue on iPhone6s. (4.10.1) I got around the issue by changing the directional light mobility from Stationary to **Movable**. Although Epic warns about performance hit, but for our scene which is quite complex the performance was same for iPhone6s. Hope this helps.
