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


GML Code Example


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

Returns: N/A


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).


GML Code Example


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

Back: Shaders

No Examples Submitted

Does this page need better examples? Be the first to Submit

No Edits Suggested

Is this page unclear or not descriptive enough? Suggest an edit to the page and with enough upvotes your changes will be made.

No Questions Have Been Ask

Do you have a question about this page? Ask it Here