3D Text Shade do not work properly (Characters occluding other characters)


I have a 3D Text Shader, which make 3D text to not be rendered through walls and object.

Here is the Shader

Shader "GUI/3D Text Shader" { 

Properties { 
   _MainTex ("Font Texture", 2D) = "white" {} 
   _Color ("Text Color", Color) = (1,1,1,1) 

SubShader { 
   Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" } 
   Lighting Off Cull Off ZWrite On Fog { Mode Off } 
   Blend SrcAlpha OneMinusSrcAlpha 
   Pass { 
      Color [_Color] 
      SetTexture [_MainTex] { 
         combine primary, texture * primary 

When I rotate my text, it does not render correctly. Parts disappear, sometime whole letters. As seen here :

Any ideas what might happen?
I used this shader in an old version of unity 3D (3.0) and it worked perfectly. Even now, If I open that old project. It still works perfectly.

Edit: I’ve found the bug, some fonts are non-standard and characters overlaps. This cause and occluding/rendering error.

So to rectify this, I’d need some way that characters does not occlude letter parts of the same mesh.


ZWrite On


ZWrite Off

The drawback is that one TextMesh behind another one may be rendered after and appear in the front.