TextureFilter Enumeration (Microsoft.DirectX.Direct3D)

Defines texture filtering modes for a texture stage.

Definition

Visual Basic Public Enum TextureFilter
C# public enum TextureFilter
C++ public enum class TextureFilter
JScript public enum TextureFilter

Members

Member Value Description
GaussianQuad 7 A 4-sample Gaussian filter used as a texture magnification or minification filter.
PyramidalQuad 6 A 4-sample tent filter used as a texture magnification or minification filter.
Anisotropic 3 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.
Linear 2 Bilinear interpolation filtering used as a texture magnification or minification filter. A weighted average of a 2x2 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.
Point 1 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.
None 0 Mipmapping disabled. The rasterizer uses the magnification filter instead.

Remarks

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

The following C# example shows how to set a texture stage's magnification filter by setting the SamplerStateManager.MagFilter property to a member of this enumeration.

              [C#]
              
    ...
       device.SamplerState[0].MagFilter = TextureFilter.Linear;
     ...

The following C# code example shows how to set a texture stage's minification filter by setting the SamplerStateManager.MinFilter property to a member of this enumeration.

              [C#]
              
    ...
       device.SamplerState[0].MinFilter = TextureFilter.Linear;
     ...

The following C# code example shows how to set the texture filter to use between mipmap levels by setting the SamplerStateManager.MipFilter property to a member of this enumeration.

              [C#]
              
    ...
       device.SamplerState[0].MipFilter = TextureFilter.Linear;
     ...

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 the TextureCaps.SupportsMipVolumeMap property is set to true (the TextureCaps can be found in the Caps.TextureCaps property), 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 2-D 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).

Enumeration Information

Namespace Microsoft.DirectX.Direct3D
Assembly Microsoft.DirectX.Direct3D (microsoft.directx.direct3d.dll)
Strong Name Microsoft.DirectX.Direct3D,  Version=1.0.900.0,  Culture=neutral,  PublicKeyToken=d3231b57b74a1492