AlphaSelfIllum

From Unify Community Wiki
(Difference between revisions)
Jump to: navigation, search
(Removing all content from page)
m (Reverted edits by Joseph05408 (Talk); changed back to last version by NCarter)
Line 1: Line 1:
 +
[[Image:AlphaSelfIllum.jpg|thumb|100px|Self illuminating alpha texture]]
  
 +
Author: Bill Vinton (Sync1B)
 +
 +
== 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>

Revision as of 19:29, 19 October 2009

Self illuminating alpha texture

Author: Bill Vinton (Sync1B)

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>

Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox