Texture filtering: Difference between revisions

Ahayri (talk | contribs)
Ahayri (talk | contribs)
Line 72: Line 72:
|-
|-
|'''Nearest neighbor'''
|'''Nearest neighbor'''
|This method sorts pixels into the nearest place relevant to its placement in the original resolution, in order to display the image at whatever resolution you specify.
|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.
|
|
*Very fast.
* Fast and computationally cheap (minimal GPU cost).
*At integer values/integer scaling (eg, exactly double or quadruple resolution) it's practically "unfiltered".
* Preserves sharp pixel-art style with practically no blur or smoothing when using with integer scaling.
|
|
*Unfiltered pixels tend to look odd, with some being thicker than others. This can result in pixel art losing clarity, and text may become hard to read.
* 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)