Description

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.

Steps to Reproduce

run steps described in [Link Removed] and then set r.Mobile.ForceDepthResolve 0 and observe broken shadows.

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-37809 in the post.

0
Login to Vote

Won't Fix
CreatedOct 26, 2016
ResolvedMay 30, 2019
UpdatedSep 16, 2019