shader_enable_corner_id

Permit all shaders to use colour bytes to determine the corner id of the vertex.

Syntax:

shader_enable_corner_id(enable);


Argument Description
enable Enable (true) or disable (false) this function.


Returns: N/A


Description

With this function you can set a global state for all shaders being used where, when enabled, the shader "steals" 2 bits from the input colour values. The first is from the lower bit of the red colour value, and the second is from the lower bit of the blue colour value. These values can get then be recovered in the shader to work out which vertex your dealing with (ie: which corner).


Example:

shader_enable_corner_id(true);

The above code will enable the use of colour bits for the corner id for all shaders.


Back: Shaders
© Copyright YoYo Games Ltd. 2018 All Rights Reserved