materials
Material system
create
materials.create(name: string, type: string, shader_params: table) Material
Creates new material from specified shader parameters.
find
materials.find(name: string) Material
draw_model
materials.draw_model(material: Material[, alpha: number])
Renders model with specified material. Can only be called inside draw_chams callback.
Material
get_name
mat:get_name() string
color_modulate
mat:color_modulate([col: color]) color
Returns color modulation if col is nil, otherwise sets new color modulation.
alpha_modulate
mat:alpha_modulate([alpha: number]) number
Returns alpha modulation if alpha is nil, otherwise sets new alpha modulation, for rendering transparent models prefer using alpha parameter in draw_model function.
var_flag
mat:var_flag(flag: number[, on: boolean]) boolean
increment_ref_count
mat:increment_ref_count()
decrement_ref_count
mat:decrement_ref_count()
Last updated