- Home /
Problem while using Depth Buffer (Depth Mask) in Unity
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]
Here is the Custom Shader file data
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}}
} }
We have tried changing the ZTest from LEqual to Always which solves the problem a bit but again the object is partially visible.
Your answer
Follow this Question
Related Questions
Shader offset to prevent z-fighting ignores ambient light. Please help. 0 Answers
ViewModel Z depth buffer fix floating point 0 Answers
How to draw a mesh transparently without "hidden parts"? 1 Answer
Character behind obstacles shader, multiple Pass issue 0 Answers
Changing Depth Buffer Comparison Function for Specific Camera 0 Answers