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.
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.
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.
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.
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.
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.