TexturedFont

From Unify Community Wiki
(Difference between revisions)
Jump to: navigation, search
(Description)
Line 1: Line 1:
 +
[[Category: ShaderLab]]
 +
[[Category: GUIText]]
 +
[[Category: Font]]
 
Author: Jonathan Czeck (aarku)
 
Author: Jonathan Czeck (aarku)
 
==Description==
 
==Description==

Revision as of 22:04, 1 December 2005

Author: Jonathan Czeck (aarku)

Description

This shader will allow you to have 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

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
			}
		}
	}
}
Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox