Share via


D3DTEXTUREFILTERTYPE

This enumeration defines texture filtering modes for a texture stage.

typedef enum _D3DTEXTUREFILTERTYPE {
  D3DTEXF_NONE = 0,
  D3DTEXF_POINT = 1,
  D3DTEXF_LINEAR = 2,
  D3DTEXF_ANISOTROPIC = 3,
  D3DTEXF_FLATCUBIC = 4,
  D3DTEXF_GAUSSIANCUBIC = 5,
  D3DTEXF_FORCE_DWORD = 0x7fffffff
} D3DTEXTUREFILTERTYPE;

Constants

  • D3DTEXF_NONE
    Mipmapping disabled. The rasterizer should use the magnification filter instead.

  • D3DTEXF_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 to be used between mipmap levels is nearest-point mipmap filtering. The rasterizer uses the color from the texel of the nearest mipmap texture.

  • D3DTEXF_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 to use between mipmap levels is trilinear mipmap interpolation. The rasterizer linearly interpolates pixel color, using the texels of the two nearest mipmap textures.

  • D3DTEXF_ANISOTROPIC
    Anisotropic texture filtering used as a texture magnification or minification filter. Compensates for distortion caused by the difference in angle between the texture polygon and the plane of the screen.

  • D3DTEXF_FLATCUBIC
    Flat-cubic filtering used as a texture magnification filter.

  • D3DTEXF_GAUSSIANCUBIC
    Gaussian-cubic filtering used as a texture magnification filter.

  • D3DTEXF_FORCE_DWORD
    Forces this enumeration to compile to 32 bits in size. This value is not used.

Remarks

Not all valid filtering modes for a device will apply to volume maps. In general, D3DTEXF_POINT and D3DTEXF_LINEAR magnification filters will be supported for volume maps. If D3DPTEXTURECAPS_MIPVOLUMEMAP is set, then the D3DTEXF_POINT mipmap filter and D3DTEXF_POINT and D3DTEXF_LINEAR minification filters will be supported for volume maps. The device may or may not support the D3DTEXF_LINEAR mipmap filter for volume maps. DirectX 8 devices that support anisotropic filtering for 2-D maps do not necessarily support anisotropic filtering for volume maps. However, applications that enable anisotropic filtering will receive the best available filtering (probably linear) if anisotropic filtering is not supported.

Set a texture stage's magnification filter by calling the IDirect3DDevice8::SetTextureStageState method with the D3DTSS_MAGFILTER value as the second parameter and one member of this enumeration as the third parameter.

Set a texture stage's minification filter by calling SetTextureStageState with the D3DTSS_MINFILTER value as the second parameter and one member of this enumeration as the third parameter.

Set the texture filter to use between mipmap levels by calling SetTextureStageState with the D3DTSS_MIPFILTER value as the second parameter and one member of this enumeration as the third parameter.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: D3d8types.h.

See Also

D3DTEXTURESTAGESTATETYPE | IDirect3DDevice8::SetTextureStageState

 Last updated on Thursday, April 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.