[SOLVED] Depth Blend Shader doesn't work on iOS

I built my prototype to iOS for the first time yesterday. It’s using a Cloud shader that does depth-based blending, similar to how soft particles work.

For some reason, this shader doesn’t work on iOS, where it just shows up fully opaque.

Here is the shader: SOURCE CODE.

Are there any special steps to use Depth-based effects on iOS/Metal? I have added the PostProcessing stack for AO, but that should also enable the Camera to render Depth. (It says: “Info: renders Depth Texture”)

I also added a cube with a Soft Particle material (Particles/Standard Unlit) for comparison.

Other Info:

  • Unity 2019.2.8f1
  • using Metal
  • iOS13
  • PostProcessing stack v2.1.6

Ok, I figured this one out. This was a bug on my side where I wasn’t setting a shader property correctly. The depths blending still works though.

I am still having problems with rendering on iOS, but different ones: Custom Postprocessing Effect (BeforeTransparent) Breaks Transparent Objects on iOS