TexturedFont

From Unify Community Wiki
(Difference between revisions)
Jump to: navigation, search
m (Description)
Line 4: Line 4:
 
Author: Jonathan Czeck (aarku)
 
Author: Jonathan Czeck (aarku)
 
==Description==
 
==Description==
This shader will allow you to have multicolored [http://otee.dk/Documentation/Components/class-Font.html font] in place of a solid-colored one that shaders in the current version of [http://otee.dk/unity/ Unity] supports.
+
This shader will allow you to have a multicolored [http://otee.dk/Documentation/Components/class-Font.html font] in place of a solid-colored one that shaders in the current version of [http://otee.dk/unity/ Unity] supports.
  
 
==Usage==
 
==Usage==

Revision as of 08:22, 3 December 2005

Author: Jonathan Czeck (aarku)

Description

This shader will allow you to have a multicolored font in place of a solid-colored one that shaders in the current version of Unity supports.

Usage

Place this shader somewhere in your Assets folder hierarchy. Then, use it on a font's material in place of the Text Font shader.

ShaderLab - TexturedFont.shader

<shaderlab>

Shader "GUI/Textured Text Shader"
{
	Properties {
		_MainTex ("Font Texture", 2D) = "white" {}
	}
	
	SubShader {
		Lighting Off
		cull off
		ztest always
		Zwrite off
		Fog { Mode Off }
		Tags {"Queue" = "Transparent" }
		Pass {
			Blend SrcAlpha OneMinusSrcAlpha
			SetTexture [_MainTex] {
				Combine texture, texture
			}
		}
	}
}

</shaderlab>

Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox