While using some 3D models the depth Mask Shader which is having z-test as "LEqual" need to perform normally as in screenshot1
But it give result which shows grayscale outlined of that part of 3d model where it need to be hidden. [Take reference of screenshot2]
We have tried changing the ZTest from LEqual to Always which solves the problem a bit but again the object is partially visible.
Shader "Custom/mask" {
SubShader {
Tags {
"Queue" = "Geometry+10"
"RenderType" = "Opaque"
}
Lighting Off
ZTest LEqual
Cull Back
ZWrite On
ColorMask 0
Blend One One
Pass {Fog {Mode Off}}
} }