Texture Blending and Multi-Texture

Texture blending determines how multiple textures are blended together and appear on a surface.

Blending Formulas

Add
Base map + blend map * factor

Multiply
Base map * blend map * (1 + factor)

Linear Blend
 (1 - factor) * base map + factor * blend map

Max Alpha
max(base map alpha, blend map alpha), alpha weighted by factor
0 factor value weights toward base map, 1 factor value weights toward blend map

Note: Factor is a scalar value, either constant or variable luminance value from a map in range from (0 - 1)

Illustration of texture blending formulas

Texture Blending using base map, blend map with constant factor

                                                                                                   Blend Map for Max Alpha
        Base Map                    Blend Map                                                  example below


            Add                          Multiply                    Linear Blend                 Max Alpha


Texture Blending using base map, blend map with blend factor map

       Base Map                      Blend Map               Blend Factor Map


            Add                           Multiply                   Linear Blend                 Max Alpha


Two stage Texture Blending with 3 Color Maps and 2 Factors

Two stage texture blending uses one of above blending formulas for base map, blend map, then blends result with a 3rd color map and blending formula.  Two stage blending requires use of the blend factor map.  1st blend factor is from the R channel, 2nd blend factor is from G channel of the blend factor map.

        Base Map                    Blend Map                  Blend Map 2             Blend Factor Map


Linear Blend base map, blend map -> Linear blend result with blend map 2

Black area from blend factor map = base map
Red area from blend factor map = blend map
Green area from blend factor map = blend map 2








Example rendering with 2 different blend formulas applied with maps shown

         Base Map                   Blend Map                   Blend Map 2             Blend Factor Map


Starting with base map

1st blend: Multiple base * blend map with factor = 0

2nd blend: Max Alpha(1st blend result, blend map 2) using G channel from blend factor map