D3DTEXTUREFILTERTYPE enumeration
Defines texture filtering modes for a texture stage.
Syntax
typedef enum D3DTEXTUREFILTERTYPE {
D3DTEXF_NONE = 0,
D3DTEXF_POINT = 1,
D3DTEXF_LINEAR = 2,
D3DTEXF_ANISOTROPIC = 3,
D3DTEXF_PYRAMIDALQUAD = 6,
D3DTEXF_GAUSSIANQUAD = 7,
D3DTEXF_CONVOLUTIONMONO = 8,
D3DTEXF_FORCE_DWORD = 0x7fffffff
} D3DTEXTUREFILTERTYPE, *LPD3DTEXTUREFILTERTYPE;
Constants
-
D3DTEXF_NONE
-
When used with D3DSAMP_MIPFILTER, disables mipmapping.
-
D3DTEXF_POINT
-
When used with D3DSAMP_ MAGFILTER or D3DSAMP_MINFILTER, specifies that point filtering is to be used as the texture magnification or minification filter respectively. When used with D3DSAMP_MIPFILTER, enables mipmapping and specifies that the rasterizer chooses the color from the texel of the nearest mip level.
-
D3DTEXF_LINEAR
-
When used with D3DSAMP_ MAGFILTER or D3DSAMP_MINFILTER, specifies that linear filtering is to be used as the texture magnification or minification filter respectively. When used with D3DSAMP_MIPFILTER, enables mipmapping and trilinear filtering; it specifies that the rasterizer interpolates between the two nearest mip levels.
-
D3DTEXF_ANISOTROPIC
-
When used with D3DSAMP_ MAGFILTER or D3DSAMP_MINFILTER, specifies that anisotropic texture filtering used as a texture magnification or minification filter respectively. Compensates for distortion caused by the difference in angle between the texture polygon and the plane of the screen. Use with D3DSAMP_MIPFILTER is undefined.
-
D3DTEXF_PYRAMIDALQUAD
-
A 4-sample tent filter used as a texture magnification or minification filter. Use with D3DSAMP_MIPFILTER is undefined.
-
D3DTEXF_GAUSSIANQUAD
-
A 4-sample Gaussian filter used as a texture magnification or minification filter. Use with D3DSAMP_MIPFILTER is undefined.
-
D3DTEXF_CONVOLUTIONMONO
-
Convolution filter for monochrome textures. See D3DFMT_A1.
Differences between Direct3D 9 and Direct3D 9Ex:
- This flag is available in Direct3D 9Ex only.
Use with D3DSAMP_MIPFILTER is undefined.
-
D3DTEXF_FORCE_DWORD
-
Forces this enumeration to compile to 32 bits in size. Without this value, some compilers would allow this enumeration to compile to a size other than 32 bits. This value is not used.
Remarks
D3DTEXTUREFILTERTYPE is used by IDirect3DDevice9::SetSamplerState along with D3DSAMPLERSTATETYPE to define texture filtering modes for a texture stage.
To check if a format supports texture filter types other than D3DTEXF_POINT (which is always supported), call IDirect3D9::CheckDeviceFormat with D3DUSAGE_QUERY_FILTER.
Set a texture stage's magnification filter by calling IDirect3DDevice9::SetSamplerState with the D3DSAMP_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 IDirect3DDevice9::SetSamplerState with the D3DSAMP_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 IDirect3DDevice9::SetSamplerState with the D3DSAMP_MIPFILTER value as the second parameter and one member of this enumeration as the third parameter.
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. Devices that support anisotropic filtering for 2D 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.
Requirements
Requirement | Value |
---|---|
Header |
|
See also