API Reference · Materials and textures
TextureFilter
public enum TextureFilterHow a texture is sampled between its texels.
Values
| Value | Description |
|---|---|
Linear | Blends the four nearest texels. The right default and what a photograph, a normal map or a generated gradient wants: the image is a continuous thing that happens to be stored as a grid. |
Nearest | Takes the one texel the coordinate lands in, with no blending — so a texel magnified across many pixels stays a hard-edged square. For images where the grid is the content and blurring it destroys it: pixel art, a palette or lookup strip, an atlas of glyphs, anything read back as data. A 128-pixel-wide game on a screen four hundred pixels across is a different picture under each filter, and only one of them is the picture that was drawn. |