Nearest
View sourceSelects the nearest texel without mipmaps (0x2600, NEAREST).
Enum
Selects how WebGL samples a texture between texels and mip levels.
Pass a member to WebGLRenderingContext#texParameteri
with TEXTURE_MIN_FILTER or TEXTURE_MAG_FILTER. The four mipmap members
are minification filters; use Nearest or Linear for magnification.
import { TextureFilter } from '@wimaengine/render-webgl'
gl.texParameteri(
gl.TEXTURE_2D,
gl.TEXTURE_MIN_FILTER,
TextureFilter.LINEAR_MIPMAP_LINEAR
)
gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, TextureFilter.Linear)Selects the nearest texel without mipmaps (0x2600, NEAREST).
Interpolates neighboring texels without mipmaps (0x2601, LINEAR).
Uses the nearest texel from the nearest mip level (0x2700, NEAREST_MIPMAP_NEAREST).
Interpolates texels in the nearest mip level (0x2701, LINEAR_MIPMAP_NEAREST).
Uses nearest-texel sampling while blending the two nearest mip levels (0x2702, NEAREST_MIPMAP_LINEAR).
Interpolates texels and blends the two nearest mip levels (0x2703, LINEAR_MIPMAP_LINEAR).