Hi there,
In my scene I have a text mesh sitting on the surface of another object. It’s fine most of the time but from some angles, the text mesh completely disappears. I think it’s something to do with how the shader sorts out depth but I’m not sure.
The thing is, I think it might have more to do with the shader on the object under the text mesh as the text mesh shader usually always renders on top of other objects.
This is the Text Shader
Shader "GUI/Textured Text Shader"
{
Properties {
_MainTex ("Font Texture", 2D) = "white" {}
_Color ("Text Color", Color) = (1,1,1,1)
}
SubShader {
Lighting Off
cull off
ztest always
Zwrite off
Tags {"Queue" = "Transparent" }
Pass {
Blend SrcAlpha OneMinusSrcAlpha
SetTexture [_MainTex] {
constantColor [_Color]
Combine texture * constant, texture * constant
}
}
}
}
this is the underlying object’s shader
Shader "My Shaders/No Lighting + Alpha" {
Properties {
_Color ("Color Tint", Color) = (1,1,1,1)
_MainTex ("SelfIllum Color (RGB) Alpha (A)", 2D) = "white"
}
Category {
Lighting On
ZWrite off
Cull Back
Blend SrcAlpha OneMinusSrcAlpha
Tags {Queue=Transparent}
SubShader {
Material {
Emission [_Color]
}
Pass {
SetTexture [_MainTex] {
Combine Texture * Primary, Texture * Primary
}
}
}
}
}
Can anyone shed some light on this for me?
Thanks
Pete