Draw Depth Mask On Top
Hello Everyone. I'm trying to create a depth mask that is rendered on top of everything but I'm failing at doing so. As you can see the mask (Gray area) is not drawn over everything.
I'm using a depth mask shader like this :
Shader "Custom/IndicatorDepthMask" {
Properties
{
_MainTex("Base (RGB) Alpha (A)", 2D) = "white" {}
_Cutoff("Base Alpha cutoff", Range(0,.9)) = .5
}
SubShader{
Tags{ "Queue" = "Geometry+8" }
ColorMask 0
ZWrite On
ZTest Always
Pass
{
AlphaTest Greater[_Cutoff]
SetTexture[_MainTex]{
combine texture * primary, texture
}
}
}
}
The Only solution so far is positioning the object closer to the camera so everything is behind the arrow. But that is giving me problems with scaling and so on. I needed to draw the (Depth mask) arrow on top of everything despite of its position.
Does anybody know how to do this? Or knows what I'm doing wrong that could tell me how can I achieve what I'm after?
Thank you in advance.
Your answer
Follow this Question
Related Questions
Receive Shadow Mesh Renderer - Weird Effect 0 Answers
Tilemap Shader Glitch 0 Answers
HDRP and UMMORPG server 1 Answer
Shader graph Alpha Clip with transparency 1 Answer
After changing build platform from Android to PC all objects have become red !!! 0 Answers