texture_set_repeat_ext

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

Syntax:

GML Code Example

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


Description

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


Example:

GML Code Example

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.





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