Blend 2 Textures by Lightmap Alpha

Author: Jessy

Description
This shader mixes two tiling textures based on an alpha blending map, and uses a lightmap instead of real-time lighting.

Usage
In your modeling app, you create two UV sets - one for Texture 1 and Texture 2, and another for the lightmap and blending map. The idea is that you will tile the textures using UV1, but not in UV2 - standard lightmapping practice. By default, this means that your two main textures will tile at the same "rate", but you can use the Offset and/or Tiling controls in the Material, if you think it will add visual interest.

The blend map is stored in the alpha channel of the lightmap. The two textures mix as if, in Photoshop, you had Texture 1 in a layer above Texture 2, and Texture 1 used the blend map as a layer mask. i.e. white = Texture 1, black = Texture 2. In my usage so far, I've found that it's important to have the lightmap/splatmap be at a high resolution, to preserve the shape of fine splat details, but that it's okay to use PVRTC 2 bpp compression, as the color detail is mainly coming from Texture 1 and Texture 2.