Enum Viewport.DefaultCanvasItemTextureFilter
- Namespace
- Godot
- Assembly
- GodotSharp.dll
public enum Viewport.DefaultCanvasItemTextureFilter : long
Fields
Linear = 1
The texture filter blends between the nearest 4 pixels. This makes the texture look smooth from up close, and grainy from a distance (due to mipmaps not being sampled).
LinearWithMipmaps = 2
The texture filter blends between the nearest 4 pixels and between the nearest 2 mipmaps (or uses the nearest mipmap if
ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter
istrue
). This makes the texture look smooth from up close, and smooth from a distance.Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to Camera2D zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels.
Max = 4
Max value for Viewport.DefaultCanvasItemTextureFilter enum.
Nearest = 0
The texture filter reads from the nearest pixel only. This makes the texture look pixelated from up close, and grainy from a distance (due to mipmaps not being sampled).
NearestWithMipmaps = 3
The texture filter reads from the nearest pixel and blends between the nearest 2 mipmaps (or uses the nearest mipmap if
ProjectSettings.rendering/textures/default_filters/use_nearest_mipmap_filter
istrue
). This makes the texture look pixelated from up close, and smooth from a distance.Use this for non-pixel art textures that may be viewed at a low scale (e.g. due to Camera2D zoom or sprite scaling), as mipmaps are important to smooth out pixels that are smaller than on-screen pixels.