Bagikan melalui


TextureFilter Enumeration

Defines how a texture will be filtered as it is minified for each mipmap level.

Namespace: Microsoft.Xna.Framework.Graphics
Assembly: Microsoft.Xna.Framework (in microsoft.xna.framework.dll)

Syntax

public enum TextureFilter

Members

  Member name Description
Anisotropic Anisotropic texture filtering used as a texture magnification or minification filter. This type of filtering compensates for distortion caused by the difference in angle between the texture polygon and the plane of the screen.
GaussianQuad A 4-sample Gaussian filter used as a texture magnification or minification filter.
Linear Bilinear interpolation filtering used as a texture magnification or minification filter. A weighted average of a 2×2 area of texels surrounding the desired pixel is used. The texture filter used between mipmap levels is trilinear mipmap interpolation, in which the rasterizer performs linear interpolation on pixel color, using the texels of the two nearest mipmap textures.
None Mipmapping disabled. The rasterizer uses the magnification filter instead.
Point Point filtering used as a texture magnification or minification filter. The texel with coordinates nearest to the desired pixel value is used. The texture filter used between mipmap levels is based on the nearest point; that is, the rasterizer uses the color from the texel of the nearest mipmap texture.
PyramidalQuad A 4-sample tent filter used as a texture magnification or minification filter.

Remarks

To determine whether a format supports texture filter types other than Point (which is always supported), call CheckDeviceFormat with ResourceUsage.QueryFilter.

Not all valid filtering modes for a device apply to volume maps. In general, Point and Linear magnification filters are supported for volume maps. If SupportsMipVolumeMap is true (the texture capabilities can be found in TextureCapabilities), the Point mipmap filter and the Point and Linear minification filters are supported for volume maps. The device might or might not support the Linear mipmap filter for volume maps. Devices that support anisotropic filtering for 2D maps do not necessarily support it for volume maps. However, applications that enable anisotropic filtering, even if they do not support it, receive the best available filtering (probably linear).

See Also

Reference

GraphicsDeviceCapabilities.FilterCaps Properties
SamplerState.MagFilter Property
SamplerState.MinFilter Property
SamplerState.MipFilter Property
Texture.GenerateMipMaps Method
QueryUsages Enumeration
ResourceUsage Enumeration
Microsoft.Xna.Framework.Graphics Namespace

Platforms

Xbox 360, Windows XP SP2, Windows Vista