Skip to content

FilterMode

FilterMode is an enumeration type used to specify the texture filtering mode.

  • Point: No filtering is applied, resulting in a pixelated appearance.
  • Bilinear: Uses a weighted average of the four nearest texels to produce a smoother appearance.
  • Trilinear: Similar to bilinear filtering, but also takes into account the difference in mip levels between adjacent texels to reduce aliasing when the texture is viewed from different distances.
attributesdescription
Point
BilinearBilinear filtering. During sampling, the color of the nearest four pixels is interpolated to calculate the final color. This filtering mode is suitable for texture downsampling, as it smooths the texture and avoids the mosaic effect.
TrilinearTrilinear filtering. During sampling, it performs bilinear interpolation between the two nearest mipmap levels of the texture, and then performs linear interpolation between the two interpolated results. This filtering mode is suitable for texture scaling, as it can smooth the texture and avoid aliasing artifacts and texture distortion.