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

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.

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.

This is an updated list :

This is our list on performance for IOS :

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

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,

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.

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.

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?

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!

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,

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!

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!

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

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.