bbmod_material_props_set

A function defined in BBMOD_MaterialPropertyBlock.gml

bbmod_material_props_set(_materialPropertyBlock)

Description

Sets a material property block as the current one. Its properties are then applied to all rendered materials until it is reset again using bbmod_material_props_reset.

Arguments

Name Type Description
_materialPropertyBlock Struct.BBMOD_MaterialPropertyBlock The material property block to set as the current one.

Example

var _materialProps = new BBMOD_MaterialPropertyBlock();
materialProps.set_color("u_vSilhouetteColor", BBMOD_C_RED);
materialProps.set_float("u_fSilhouetteStrength", 1.0);
bbmod_material_props_set(_materialProps);
model.render();
bbmod_material_props_reset();

Note

The current material property block is applied automatically every time BBMOD_Material.apply is called. If the applied material has an OnApply property, it is executed afer the material property block is applied.

See also

BBMOD_MaterialPropertyBlock, bbmod_material_props_get, bbmod_material_props_reset

Do you find this page helpful?

Copyright © 2025, BlueBurn. Built on January 04, 2025 using GMDoc.