BBMOD_U_INSTANCE_ID

A macro defined in __bbmod_shader_set.gml

Description

String Name of a fragment shader uniform of type vec4 that holds an ID of the instance that draws the model, encoded into a color.

Example

shader_set_uniform_f(
   shader_get_uniform(_shader, BBMOD_U_INSTANCE_ID),
   ((id & $000000FF) >> 0) / 255,
   ((id & $0000FF00) >> 8) / 255,
   ((id & $00FF0000) >> 16) / 255,
   ((id & $FF000000) >> 24) / 255);

See also

bbmod_set_instance_id

Do you find this page helpful?

Copyright © 2024, BlueBurn. Built on April 26, 2024 using GMDoc.