AddMaterialLayer()

Syntax

AddMaterialLayer(#Material, TextureID [, Mode [, TextureCoordinateIndex]])
Description
Adds a new layer to the material and put the specified texture in it.

Parameters

#Material The material to use.
TextureID The texture to add. A valid 'TextureID' can be easily obtained with TextureID().
Mode (optional) It can be one of the following value:
  #PB_Material_Add        : Performs a pixel 'Add' operation over previous layer (black color is like transparent)
  #PB_Material_Replace    : Performs a pixel 'Replace' operation over previous layer
  #PB_Material_AlphaBlend : Use the AlphaChannel layer of the texture (should be a TGA or PNG one) and blend it with the previous layer
  #PB_Material_Modulate   : Performs a pixel 'Modulate' operation over previous layer
TextureCoordinateIndex (optional) Texture coordinate index (default value is 0).

Return value

None.

See Also

RemoveMaterialLayer()

Supported OS

All

Material Index - CopyMaterial() ->