- Home /
3D Text Shader with light
Hi,
I'm trying to have text dislaying on a wall. So I use a 3D text gameobject with this shader i have found on the wiki :
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 ZWrite Off Fog { Mode Off }
Blend SrcAlpha OneMinusSrcAlpha
Pass {
Color [_Color]
SetTexture [_MainTex] {
combine primary, texture * primary
}
}
}
}
The problem is, I'd like to have the text being affected by light. i tried to turn "Lighting on" but then unity warns me that the mesh of the 3d text has no normals.
Is there a simple way to circumvent this problem ? By adding normal to the the mesh, or by modyfing the shader ?
I don't know much about shaders (and it seems damn complicated to learn from scratch), so i am quite stuck with this one...
Did you get this to work? I'm trying to do the same thing.
Your answer
Follow this Question
Related Questions
point light custom falloff 2 Answers
Glowing column of light 1 Answer
Stopping 3D text from showing through game objects in free unity. 1 Answer
Mobile Bumped Specular: Point Lights Only 0 Answers
a 'bar' or neon like light. 3 Answers