TerrainTwoLayerBumped

Author: Aras Pranckevicius

Description
This shader is similar to LayerShader - it mixes two tileable textures based on the third texture, and adds bumpmapping on top. In Unity 2.x it supports shadows as well.

This shader requires a fragment program card for bumpmapping to work. Where bumpmapping is not supported, it fallbacks to a vertex lit version, which is the same as LayerShader (and this requires a 4-texture card - GeForce3 and up, Radeon 8500 and up).

Note that bumpmapping version in Unity 1.x does not work on GeForceFX, even if otherwise these cards support fragment programs (shader requires more than 4 texture units per pass). In Unity 2.x it should work on GeForceFX as well.

Usage


A typical setup is displayed: two tileable textures, an alpha texture to control the blending between them, and a bump map.

ShaderLab - TerrainTwoLayerBumped.shader for Unity 2.x
This version is for Unity 2.x only!

ShaderLab - TerrainTwoLayerBumped.shader for Unity 1.x
This version is for Unity 1.x only!