Is there a way to have a text mesh only render on the front like a plane.
I want to prevent this from happening.
[3141-text+mesh.png|3141]
Is there a way to have a text mesh only render on the front like a plane.
I want to prevent this from happening.
[3141-text+mesh.png|3141]
You can use the shader below: it’s based on the 3DText shader posted by @Eric5h5 in the Wiki, but was modified to cull out the back face. The first step is to save the shader in your Assets folder with a .shader extension - like 3DTextCullBack.shader, for instance. Once the shader has been saved, follow the instructions in the @Eric5h5’s article to complete the job ( http://wiki.unity3d.com/index.php?title=3DText )
3D Shader with cull back:
Shader "GUI/3D Text Shader - Cull Back" { 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 Back ZWrite Off Fog { Mode Off } Blend SrcAlpha OneMinusSrcAlpha Pass { Color [_Color] SetTexture [_MainTex] { combine primary, texture * primary } } } }
As an extra bonus, this shader respects the depth test, thus objects in front of the 3DText will occlude it as expected (the original one rendered over everything in the scene!)
Use a material with a shader that has “cull back” in it; the default font.shader uses “cull off”. You can make a duplicate of the default font shader and change that.
3D Text uses a specific shader that is double-sided. You’d have to change the shader somehow.