shader_set


语法:

shader_set(shader);


参数 描述
shader The index of the shader to use.


返回:

N/A(无返回值)


描述

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.
重要!该函数在试用版(Trial License)产品中可用。


例如:

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.