4.14 rendering BUG on mobile

The 4.14 updates says that:Custom Depth is now supported on mobile. Custom Post-process materials can now sample from SceneDepth and CustomDepth as well as SceneColor.

And when I use 4.14p1,that works pretty well on ios,however,when I update to preview2,the post processing material which using the custom depth to implement the outline effect doesn’t work on iphone7 plus and iphone6s.On both devices show white screen.
To reproduce this,just create a postprocess material using scenedepth and add that to the post process volume and enable custom depth in mesh or skeletonmesh,after packaging to ios with metal enabled

for your help!

Hi hls,

I’m going to start investigating your first issue. Before that though could you separate issue 2 and issue 3 into separate posts. I know this seems pointless but it is important that we keep a separate post for each issue so that users can easily find these posts and get help.

With words like “several rendering bugs” is a bit vague and may make it hard for others to find.

Once you have made the other posts leave a link here to your other posts and I will update the title accordingly.

,

Ed

for the reply!Here’s the other 2 bugs:

I did some testing on preview 3 and scene depth/ custom depth displayed correctly on the iphone 6s on our end. Could you test these features to see if they are working for you on the new preview build?

,

Sadly,I have tried this in 4.14 release,this does not work even in a third person template.You could try the file attached here as the post process material.
To reproduce:
a.create a third person template
b.create a post process volume and add the post process material provided
c.open the ThirdPersonCharacter bp and in the mesh component, tick on the rendercustomdepthpath.Then package to ios with metal enabled in the project setting.

Finally you will see the custom depth material does not render and the scene depth looks quite strange that the background are rendering totally white…
This BUG only appears on ios not android.

!

Hey hls,

I have reproduced this issue and logged a report for it here: Unreal Engine Issues and Bug Tracker (UE-38696)

This issue turned out to be quite the headache and it seems that there are some other things going wrong in your material for IOS. Meaning that I will have to do additional testing and may need to write more JIRAs regarding these issues.

You can track the report that posted earlier’s status as the issue is reviewed by our development staff. Please be aware that this issue may not be prioritized or fixed soon.

Cheers,

This material will not work correctly on mobile. Fragment shader has limited precision and I see that there are number of operations that will overflow. Like sum of 7 samples from CustomDepth and MaxZ parameter is way bigger than range of mediump float [-65k, 65k]. Overflow is handled differently on different mobile GPUs, so that may explain why if appears to work on some Android devices but not on iOS.

When you sample from CustomDepth or SceneDepth you need to normalize value to [0,1] range before doing any math with it. Something like frac(clamp(Depth, 0, MaxZ)/MaxZ). frac will turn here values with MaxZ to 0.

very much!But this material actually works on 4.14 preview1 indeed.I’m sure it worked on ios metal before.