What is nearest-neighbour filtering for pixel art?
Texture sampling that takes the closest pixel instead of blending neighbours, which keeps pixel art sharp when it is scaled up.
Engines default to linear filtering, which makes small pixel art look blurry when enlarged. Set the texture filter to Nearest (in Godot, the project's default canvas texture filter or the node's texture_filter) and scale by whole numbers (2×, 3×, 4×) so every source pixel becomes the same number of screen pixels.
Non-integer scaling with nearest filtering makes some pixels wider than others; integer scaling or a viewport stretch mode avoids it.
Sources
Related terms
- Sprite sheetOne image that holds many frames of a 2D character or effect, laid out in a grid or packed, plus data saying where each frame is.
- MipmapsPre-shrunk copies of a texture (each half the size of the last) that the GPU uses when the texture is drawn small or far away, to avoid shimmering.