texture_set_interpolation_ext

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

Syntax:

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:

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.


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