Sets how a texture is be interpolated when upscaled or downscaled. Nearest filtering uses nearest neighbor scaling when interpolating Linear filtering uses WebGL's linear scaling when interpolating
Examples
Syntax
setInterpolation(downScale, upScale)
Parameters
downScale
String: Specifies the texture filtering when textures are shrunk. Options are LINEAR or NEAREST
upScale
String: Specifies the texture filtering when textures are magnified. Options are LINEAR or NEAREST
Notice any errors or typos? Please let us know. Please feel free to edit src/webgl/p5.Texture.js and open a pull request!
Related References
copyToContext
Copies the shader from one drawing context to another.
inspectHooks
Logs the hooks available in this shader, and their current implementation.
modify
Returns a new shader, based on the original, but with custom snippets of shader code replacing default behaviour.
setUniform
Sets the shader’s uniform (global) variables.