Texture filtering: Difference between revisions
| Line 72: | Line 72: | ||
|- | |- | ||
|'''Nearest neighbor''' | |'''Nearest neighbor''' | ||
|This method | |This scaling method assigns each output pixel the color of the single closest pixel in the original image (no averaging or blending). When enlarging an image, each source pixel is effectively “copied” into a block of identical pixels (e.g., 2× scaling turns 1 pixel into a 2×2 block). This preserves hard edges and a crisp, blocky appearance. | ||
| | | | ||
* | * Fast and computationally cheap (minimal GPU cost). | ||
* | * Preserves sharp pixel-art style with practically no blur or smoothing when using with integer scaling. | ||
| | | | ||
* | * If the output is not a perfect multiple (e.g., integer scaling 240p to 1080p), and instead using non-integer scaling: it causes uneven pixel sizes, leading to distortion, shimmer, or wobble artifacts during movement. | ||
* Text and fine details can look distorted or "warped" on modern displays if the scaling isn't perfectly aligned. | |||
* To avoid distortion, users often must use "Integer Scaling", which usually results in black bars on the top/bottom or sides of the screen on modern displays. | |||
|- | |- | ||
|'''Bilinear''' (Smooth) | |'''Bilinear''' (Smooth) | ||