shader_set

Set a shader to be used for all further drawing.

Syntax:

GML Code Example

shader_set(shader);


Argument Description
shader The index of the shader to use.


Returns: N/A


Description

With this function you can set the drawing target to the given shader and all further drawing will be done using that. You can end shader use with function shader_reset.

NOTE: You can only call a shader in the Draw Event of an instance.


Example:

GML Code Example

shader_set(shader_Glass);
 draw_self();
 shader_reset();
 

The above code will set a shader top be used for drawing, then draw the current sprite used for the instance using it.





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