Pass { Tags{"Lightmode" = "ShadowCaster"} ZWrite On ZTest LEqual CGPROGRAM #pragma target 2.0 #pragma vertex ShadowPassVertex #pragma fragment ShadowPassFragment #include "UnityCG.cginc" #include "LightweightPassShadow.cginc" ENDCG } Pass { Tags{"Lightmode" = "DepthOnly"} ZWrite On CGPROGRAM #pragma target 2.0 #pragma vertex vert #pragma fragment frag #include "UnityCG.cginc" float4 vert(float4 pos : POSITION) : SV_POSITION { return UnityObjectToClipPos(pos); } half4 frag() : SV_TARGET { return 0; } ENDCG }