VegetationVertexLit

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

Jump to: navigation, search

Author: Jeff McArthur (guategeek, Outcast)

Description

This is the Vertex Lit shader with Culling turned off. I use it all the time on my trees and plants.

Usage

Place this shader somewhere in your Assets folder hierarchy. Then, use it on any object where you want Culling off and alpha textures and Vertex Lighting.

ShaderLab - VegetationVertexLit.shader

Shader "Nature/Vegitation Vertex Lit" {
	Properties {
		_Color ("Main Color", Color) = (1,1,1,1)
		_SpecColor ("Spec Color", Color) = (1,1,1,0)
		_Emission ("Emmisive Color", Color) = (0,0,0,0)
		_Shininess ("Shininess", Range (0.1, 1)) = 0.7
		_MainTex ("Base (RGB) Trans. (Alpha)", 2D) = "white" { }
	}

	Category {
		ZWrite Off
		Cull Off
		Alphatest Greater 0
		Tags {Queue=Transparent}
		Blend SrcAlpha OneMinusSrcAlpha 
		SubShader {
			Material {
				Diffuse [_Color]
				Ambient [_Color]
				Shininess [_Shininess]
				Specular [_SpecColor]
				Emission [_Emission]	
			}
			Pass {
				Lighting On
				SeperateSpecular On
				SetTexture [_MainTex] {
					constantColor [_Color]
					Combine texture * primary DOUBLE, texture * constant 
				} 
			}
		} 
	}
}
Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox