M MY Multiplayer: Wiki
Side
Kind

engineSetMaterialAlphaClip

Client

Makes the material cut out pixels whose alpha is below a threshold, or stop cutting out.

bool engineSetMaterialAlphaClip(material material, float|false|nil clip)

Parameters

NameTypeDescription
materialmaterialThe material.
clipfloat|false|nilThe alpha threshold, from 0 to 1. false turns cutting out off. nil follows the base again.

Returns

true when it was set.

Example

local leaves = engineCreateMaterial()
engineSetMaterialAlphaClip(leaves, 0.4)
engineSetWorldMaterial("*leaves*", leaves)
NoteA number outside 0..1 is an error, and so is true.

See also