ProjectorAdditive

From Unify Community Wiki
Revision as of 17:27, 25 June 2006 by Aarku (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Description

This shader is for the Projector component and will let you have an additive effect projected onto objects as opposed to the built in multiply effect.

Usage

Place this shader somewhere in your Assets folder hierarchy. Then, use it on a Projector component's material similar to how the blob shadow in the Standard Assets is set up.

ShaderLab - Projector Additive.shader

<shaderlab> Shader "Projector/Additive" {

  Properties { 
     _ShadowTex ("Cookie", 2D) = "" { TexGen ObjectLinear } 
     _FalloffTex ("FallOff", 2D) = "" { TexGen ObjectLinear } 
  } 
  Subshader { 
     Pass { 
        ZWrite off 
        Fog { Color (1, 1, 1) } 
        ColorMask RGB 
        Blend One One 
        SetTexture [_ShadowTex] { 
           combine texture, ONE - texture 
           Matrix [_Projector] 
        } 
        SetTexture [_FalloffTex] { 
           constantColor (1,1,1,0) 
           combine previous lerp (texture) constant 
           Matrix [_ProjectorClip] 
        } 
     }</shaderlab>
Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox