LayerShader

From Unify Community Wiki
(Difference between revisions)
Jump to: navigation, search
Line 9: Line 9:
  
  
==ShaderLab - VegetationVertexLit.shader==
+
==ShaderLab - TerrainLayerShader.shader==
 
<shaderlab>
 
<shaderlab>
 
Shader "MyShaders/Terrain" {
 
Shader "MyShaders/Terrain" {

Revision as of 07:53, 8 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 - TerrainLayerShader.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