*** Welcome to piglix ***

Texture filtering


In computer graphics, texture filtering or texture smoothing is the method used to determine the texture color for a texture mapped pixel, using the colors of nearby texels (pixels of the texture). Mathematically, texture filtering is a type of anti-aliasing (AA), but it filters out high frequencies from the texture fill whereas other AA techniques generally focus on geometric edges. Put simply, it allows a texture to be applied at many different shapes, sizes and angles while minimizing blurriness, shimmering and blocking. As of 2016, it is most commonly performed by dedicated hardware (texture sampling units in graphics processing units).

There are many methods of texture filtering, which make different trade-offs between computational complexity and image quality.

During the texture mapping process, a texture lookup takes place to find out where on the texture each pixel center falls. Since the textured surface may be at an arbitrary distance and orientation relative to the viewer, one pixel does not usually correspond directly to one texel. Some form of filtering has to be applied to determine the best color for the pixel. Insufficient or incorrect filtering will show up in the image as artifacts (errors in the image), such as 'blockiness', jaggies, or shimmering.

There can be different types of correspondence between a pixel and the texel/texels it represents on the screen. These depend on the position of the textured surface relative to the viewer, and different forms of filtering are needed in each case. Given a square texture mapped on to a square surface in the world, at some viewing distance the size of one screen pixel is exactly the same as one texel. Closer than that, the texels are larger than screen pixels, and need to be scaled up appropriately - a process known as texture magnification. Farther away, each texel is smaller than a pixel, and so one pixel covers multiple texels. In this case an appropriate color has to be picked based on the covered texels, via texture minification. Graphics APIs such as OpenGL allow the programmer to set different choices for minification and magnification filters.


...
Wikipedia

...