Share via


FilterOptions Enumeration

Note

This enumeration is available only when developing for Windows.

Defines modes describing how to filter an image or mipmap when it is minified or magnified to fit a set of vertices.

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

Syntax

[FlagsAttribute]
public enum FilterOptions

Members

  Member name Description
Box Each pixel is computed by averaging a 2×2(×2) box of pixels from the source image. This filter works only when the dimensions of the destination are half those of the source, as is the case with mipmaps.
Dither Resulting image must be dithered using a 4×4 ordered dither algorithm. This happens when converting from one format to another.
DitherDiffusion Do diffuse dithering on the image when changing from one format to another.
Linear Bilinear interpolation filtering is 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 to use between mipmap levels is trilinear mipmap interpolation. The rasterizer interpolates pixel color in a linear manner, using the texels of the two nearest textures.
Mirror Same as specifying the MirrorU, MirrorV, and MirrorW flags. This flag is always used internally for this function.
MirrorU Pixels off the edge of the texture on the u-axis should be mirrored, not wrapped.
MirrorV Pixels off the edge of the texture on the v-axis should be mirrored, not wrapped.
MirrorW Pixels off the edge of the texture on the w-axis should be mirrored, not wrapped.
None Mipmapping disabled. The rasterizer uses the magnification filter instead.
Point Each destination pixel is computed by sampling the nearest pixel from the source image.
Srgb Same as specifying SrgbIn | SrgbOut.
SrgbIn Input data is in sRGB (gamma 2.2) color space.
SrgbOut Output data is in sRGB (gamma 2.2) color space.
Triangle Each pixel in the source image contributes equally to the destination image. This is the slowest of the filters.

Remarks

Each valid filter must contain exactly one of the following flags: None, Point, Linear, Triangle, or Box. In addition, the bitwise OR operator can be used to specify zero or more of the following optional flags with a valid filter: MirrorU, MirrorV, MirrorW, Mirror, or Dither.

See Also

Reference

TextureCreationParameters Constructor
TextureCreationParameters.Filter Property
TextureCreationParameters.MipFilter Property
Microsoft.Xna.Framework.Graphics Namespace

Platforms

Windows XP SP2, Windows Vista