For devices without framebuffer fetch we are relying on undefined behaviour for depth reading with decals, mod shadows and depth reading materials. (ES2 spec: 3.8.6 Texture Framebuffer Attachment).
for the most part we get the behaviour we want at a good performance. However, we are liable for any odd behaviour (such as seen in [Link Removed]).
We need to provide a proper, spec compliant, solution for depth reading.
A proper fix is to set GSupportsDepthFetchDuringDepthTest=false and draw depth to a float target and pass that as the aux depth texture (as happens when GSupportsDepthFetchDuringDepthTest == false). On devices that dont support float targets this could be rgb encoded. Additionally, we could consider an error in the gl rhi to detect this scenario.
run steps described in [Link Removed] and then set r.Mobile.ForceDepthResolve 0 and observe broken shadows.
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-37809 in the post.
0 |
Component | UE - Platform - Mobile |
---|
Created | Oct 26, 2016 |
---|---|
Resolved | May 30, 2019 |
Updated | Sep 16, 2019 |