Hi all,
Just after some clarification on how depth is handled now in Unity 5.
From the upgrade notes it mentions that replacement shaders are no longer used for rendering depth:
However, in other threads I see mention of the CameraDepthNormal replacement shader being used, and in fact I just found I had to add a custom subshader to it to fix a problem with one of our vertex displacing shaders.
I’ve also noticed some inconsistencies between DirectX versions, where DX9 will render forward objects to depth without the shadow caster passes and DX11 needs the shadow caster passes to render to depth correctly.
TL/DR: Some clarification on the relations between the CameraDepthNormal replacement shader, shadow caster passes and ZWrite settings would be great
Cheers,
Sam