Indicates whether to use linear interpolation or not.


GML Code Example


Argument Description
linear Turn linear interpolation on (true) or off (false).

Returns: N/A


This function can be used to set the linear interpolation of all images drawn on the game screen with GameMaker: Studio. When this is set to on (true) all textures will be smoothed when drawn (this includes sprites as they too are considered textures), meaning that when scaled or moved if there is not a 1:1 pixel ratio then there will be a "smudging" across various pixels which may make images appear blurry depending on the art style used. If this is switch off (false) then images will be drawn based on the nearest pixel when scaled or moving which may lead to "blocky" images. The default value is false, and this can also be changed in the Global Game Settings for individual target platforms.

NOTE: This setting will over-ride any texture stage interpolation set for shaders using the function texture_set_interpolation_ext.


GML Code Example

if global.Smoothing

The above code will turn interpolation on or off depending on the value of a global variable.

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