TexturedFont

From Unify Community Wiki
Revision as of 22:04, 1 December 2005 by Aarku (Talk | contribs)

Jump to: navigation, search

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