texture_set_interpolation_ext

Indicates whether to use linear interpolation or not for a given shader sampler.

Syntax:

GML Code Example

texture_set_interpolation_ext(sampler_id, linear);


Argument Description
sampler_id The sampler id from the shader.
linear Turn linear interpolation on (true) or off (false).


Returns: N/A


Description

This function can be used to set the linear interpolation a single sampler "slot" when using Shaders in GameMaker: Studio. When this is set to on (true) the sampler texture will be smoothed and if this is switch off (false) then images will be drawn based on the nearest pixel. The default value is that set by the Global Game Settings for your game, or that set using the function texture_set_interpolation.

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


Example:

GML Code Example

shader_sample = shader_get_sampler_index(shader_glass, "s_NoiseSampler");
 texture_set_interpolation_ext(shader_sample, false);
 

The above code will turn interpolation 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