LayerShader

From Unify Community Wiki
(Difference between revisions)
Jump to: navigation, search
 
Line 7: Line 7:
 
==Usage==
 
==Usage==
 
Terrains, Tile masking
 
Terrains, Tile masking
 
  
  

Revision as of 04:48, 7 April 2006

Author: Bill Vinton (Sync1B)

Description

Terrain using the shader

This shader is good for making terrains where you need to tile textures but still want paths.


Usage

Terrains, Tile masking


ShaderLab - VegetationVertexLit.shader

<shaderlab> Shader "MyShaders/Terrain" { Properties { _Color ("Main Color", Color) = (1,1,1,1) _MainTex ("Main Texture (RGB)", 2D) = "white" _PathTex ("Path Texture (RGB)", 2D) = "white" _PathMask ("Path Mask (Grey)", 2D) = "white" } SubShader { Pass { ZWrite On Lighting On Cull Back

Material { Diffuse [_Color] Ambient [_Color] } SetTexture [_PathTex] { combine texture } SetTexture [_PathMask] { combine previous, previous-texture } SetTexture [_MainTex] { combine previous lerp (previous) texture } SetTexture [_MainTex] { combine previous * primary } }

   } 

FallBack " Diffuse", 1 } </shaderlab>

Personal tools
Namespaces

Variants
Actions
Navigation
Extras
Toolbox