AlphaSelfIllum
Author: Bill Vinton (Sync1B) - AlphaSelfIllum
Jessy - Unlit/Tinted Alpha Blend
Contents |
Description
This shader is good for any object which needs blending but which shouldn't be affected by lighting.
Usage
Good for 3D UI elements.
ShaderLab - AlphaSelfIllum.shader
<shaderlab> Shader "My Shaders/AlphaSelfIllum" { Properties { _Color ("Color Tint", Color) = (1,1,1,1) _MainTex ("SelfIllum Color (RGB) Alpha (A)", 2D) = "white" } Category { Lighting On ZWrite Off Cull Back Blend SrcAlpha OneMinusSrcAlpha Tags {Queue=Transparent} SubShader {
Material {
Emission [_Color]
} Pass {
SetTexture [_MainTex] { Combine Texture * Primary, Texture * Primary
} } } }
} </shaderlab>
ShaderLab - Unlit/Tinted Alpha Blend.shader
I think this is less complex-looking and does the same thing. – Jessy <shaderlab>Shader "My Shaders/Unlit/Tinted Alpha Blend" {
Properties { _Color ("Color Tint (A = Opacity)", Color) = (1,1,1,1) _MainTex ("Texture (A = Transparency)", 2D) = "" }
SubShader { Tags {Queue = Transparent} ZWrite Off Blend SrcAlpha OneMinusSrcAlpha Pass { SetTexture[_MainTex] {Combine texture * constant ConstantColor[_Color]} } }
}</shaderlab>