Indicates whether a given shader sampler texture should repeat or not.


texture_set_repeat_ext(sampler_id, repeat);

Argument Description
sampler_id The sampler id from the shader.
repeat Indicate whether the texture should repeat (true) or not (false).

Returns: N/A


This function can be used to set whether a single sampler "slot" repeats the given texture when using Shaders in GameMaker: Studio. Setting it to true will repeat the texture if the uv coordinates are out with the 0-1 range, while a setting of false will mean no repeating.

NOTE: This setting will be over-ridden by the value set when calling the function texture_set_repeat().


shader_sample = shader_get_sampler_index(shader_glass, "s_NoiseSampler");
texture_set_repeat_ext(shader_sample, true);

The above code will permit the texture to repeat of for the image used in the shader sampler.

Back: Drawing
Next: texture_set_stage
© Copyright YoYo Games Ltd. 2018 All Rights Reserved