Mobile CSM shadow bias

I have a scene with movable directional light and movable meshes casting CSM shadows.

There is big difference in how the shadow is renderend on Android and in editor (with ES2 preview mode) in regard to bias. I have set bias to 0.2, which is actually too low (artifacts). On Android the shadow is still “detached” from the object that is standing on a surface, whereas in editor the shadow is perfect in this regard - see attached screenshots.

Changing shadowmap resolution/cascades does not help - it makes the gap smaller, but it does not disappear completely - it seems to be always one texel.

What can be done with that? It’s a critical issue and I’m suprised that the engine can’t handle such a case properly…

Desktop rendering:




I figured the effect is related to the TransitionScale trick in CalculateOcclusion function in base pass pixel shader - there is even a comment “Offsets shadows a bit but reduces self shadowing artifacts considerably”. When I tweak the calculations I get the offset reduced (but not completely) and indeed artifacts get worse.
The question remains why there is no offset at all in editor ES2 emulation mode - the same shader is used there.

It seems that setting “Shadow Two Sided” on the casting mesh helps. Though it’s strange, it should not be needed in this case.
Is this a bug in renderer optimization? It looks like it’s taking only backfaces into account.