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
| Name | Type | Description |
|---|---|---|
| material | material | The material. |
| clip | float|false|nil | The 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.