AlphaSelfIllum
m (Reverted edits by Joseph05408 (Talk); changed back to last version by NCarter) |
m |
||
Line 1: | Line 1: | ||
[[Image:AlphaSelfIllum.jpg|thumb|100px|Self illuminating alpha texture]] | [[Image:AlphaSelfIllum.jpg|thumb|100px|Self illuminating alpha texture]] | ||
− | Author: Bill Vinton (Sync1B) | + | Author: Bill Vinton (Sync1B) - AlphaSelfIllum |
+ | |||
+ | Jessy - Unlit/Tinted Alpha Blend | ||
== Description == | == Description == | ||
Line 38: | Line 40: | ||
} | } | ||
</shaderlab> | </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> |
Revision as of 04:05, 12 October 2010
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>