A function defined in BBMOD_MaterialPropertyBlock.gml
set(_name, _type, _value)
Sets a property to given value.
Name | Type | Description |
---|---|---|
_name | String |
The name of the property (shader uniform name). |
_type | Real |
The property type. Use values from BBMOD_EShaderUniformType. |
_value | Any |
The property value. Must match the shader uniform type! |
Struct.BBMOD_MaterialPropertyBlock
Returns self
.
var _materialProps = new BBMOD_MaterialPropertyBlock();
_materialProps.set("u_fOutlineStrength", BBMOD_EShaderUniformType.Float, 0.5);
_materialProps.set("u_vOutlineColor", BBMOD_EShaderUniformType.Color, BBMOD_C_AQUA);
You cannot have multiple properties with the same name but a different type! The property type and value is overriden each time you use this method!
BBMOD_MaterialPropertyBlock.set_color, BBMOD_MaterialPropertyBlock.set_float, BBMOD_MaterialPropertyBlock.set_float2, BBMOD_MaterialPropertyBlock.set_float3, BBMOD_MaterialPropertyBlock.set_float4, BBMOD_MaterialPropertyBlock.set_float_array, BBMOD_MaterialPropertyBlock.set_int, BBMOD_MaterialPropertyBlock.set_int2, BBMOD_MaterialPropertyBlock.set_int3, BBMOD_MaterialPropertyBlock.set_int4, BBMOD_MaterialPropertyBlock.set_int_array, BBMOD_MaterialPropertyBlock.set_matrix, BBMOD_MaterialPropertyBlock.set_matrix_array, BBMOD_MaterialPropertyBlock.set_sampler
Copyright © 2024, BlueBurn. Built on September 07, 2024 using GMDoc.