I use some 3D Text Mesh with a simple quad mesh background as sign/panel. Now the z depth is not correct on the text, it is seen through the different panels. I’ve been testing in the shader with ZTest and ZWrite, but failed to find a solution to this. Can anyone help out?
Shader "GUI/3D Text Shader 2"
{
Properties
{
_MainTex ("Font Texture", 2D) = "white" {}
_Color ("Text Color", Color) = (1,1,1,1)
}
SubShader
{
Tags { "Queue"="Overlay+1" "IgnoreProjector"="True" "RenderType"="Transparent" }
Lighting Off Cull back ZWrite Off ZTest On Fog { Mode Off }
Blend SrcAlpha OneMinusSrcAlpha
Pass
{
Color [_Color]
SetTexture [_MainTex]
{
combine primary, texture * primary
}
}
}
}