SplatMap Material (TGorillaSplatMapMaterialSource)

The TGorillaSplatMapMaterialSource is inherited from TGorillaDefaultMaterialSource, supports multiple light sources and enables splatmap functionality by: GORILLA_GLSL_DEFINE_SPLATMAP

A splatmap texture is kind of a map at which position to draw which texture.

A splatmap texture provides the RGB-channels. Each channel is used for a splat-texture. In words: Red, Blue, Green and Black stand for a specific splat-texture. Because of that the material allows 4 textures at maximum.

Example:

R = 0.5, G = 0.5, B = 0.0, A = 1.0
This will blend SplatTexture0 and SplatTexture1 at 50%.

R = 0.0, G = 0.0, B = 1.0, A = 1.0
This will only show SplatTexture2 at 100%.

You can combine splatmap materials in a TGorillaLayeredMaterialSource to use more than 4 textures. The condition is, to use transparent areas in the splatmap. Overlaying multiple splatmap materials will produce a final result.

To enable a splatmap material for transparent areas, you'll need to set “UseBlackAsTransparent” property to true.

Caution: This will reduce the number of textures per splatmap to a maximum of 3.