I think something is wrong with the way a custom PostProcessing effect affects the Depth texture.
On iOS, when I introduce a simple BeforeTransparent PP effect that only blits the screen (without alteration), transparent objects are no longer rendered after that, if they have ZTest LEqual set. With ZTest Always the objects are visible. This makes me think something is wrong with the Depth. On desktop, things work normally.
I have a simple PostProcessing effect that just blits:
public override void Render(PostProcessRenderContext context)
{
[...]
context.command.BlitFullscreenTriangle(context.source, context.destination, sheet, 0);
}
float4 Frag(Varyings i) : SV_Target
{
float4 color = SAMPLE_TEXTURE2D(_MainTex, sampler_MainTex, i.texcoord);
return color;
}
FULL SOURCE: Simple Blit Postprocessing Effect · GitHub
The screenshots below show that the box with ZTest (the green one) is missing on iOS when the PP Blit is enabled. Additionally, the Screen Space (Camera) Canvas that I added with the box labels also doesn’t render. I assume that this is also because of a broken depth test.
broken_blitting - Imgur