VegetationVertexLit

From Unify Community Wiki
(Difference between revisions)
Jump to: navigation, search
Line 9: Line 9:
  
 
==ShaderLab - VegetationVertexLit.shader==
 
==ShaderLab - VegetationVertexLit.shader==
 +
<shaderlab>
 
  Shader "Nature/Vegitation Vertex Lit" {
 
  Shader "Nature/Vegitation Vertex Lit" {
 
  Properties {
 
  Properties {
Line 43: Line 44:
 
  }
 
  }
 
  }
 
  }
 +
</shaderlab>

Revision as of 14:21, 2 December 2005

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

<shaderlab>

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 
				} 
			}
		} 
	}
}

</shaderlab>

Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox