I am trying to achieve to hide my UI elements such as text, images etc. behind another transparent image. The problem is that I am using the latest Unity version and these custom shaders have no effect on hiding the UI shaders. The two custom shaders I have applied for testing are:
Shader "Custom/DepthReserve"
{
Properties
{
}
SubShader
{
Tags { "RenderType" = "Opaque" "Queue"="Geometry-1" }
LOD 100
Blend Zero One
Pass
{
}
}
}
and
Shader "Custom/InvisibleMask" {
SubShader {
// draw after all opaque objects (queue = 2001):
Tags { "Queue"="Geometry+1" }
Pass {
Blend Zero One // keep the image behind it
}
}
}
So is there a way to use a transparent image to hide text, images and even gameobjects?