This function will set the given stage "slot" a texture to be used. The number of stage "slots" available will depend on the platform you are compiling to, with a maximum of 8 being available for Windows, Mac and Linux, but on lower end Android devices (for example) this number can be as low as 2. It is also worth noting that the first stage "slot" is always used automatically by GameMaker Studio 2.NOTE: This function will do nothing outside of the context of a running shader! See Shaders for more information.
|stage||The texture "slot" to use.|
|tex||The texture to use.|
spr = sprite_get_texture(sprite_index, 0);
The above code will get the handle for the sampler within the shader indexed as "GlassShader" and then set that shader constant to the given sprite texture.