Microsoft DirectX 8.1 (Visual Basic) |
Defines texture filtering modes for a texture stage.
Enum CONST_D3DTEXTUREFILTERTYPE D3DTEXF_NONE = 0 D3DTEXF_POINT = 1 D3DTEXF_LINEAR = 2 D3DTEXF_ANISOTROPIC = 3 D3DTEXF_FLATCUBIC = 4 D3DTEXF_GAUSSIANCUBIC = 5 End Enum
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.
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.
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.0 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 Direct3DDevice8.SetTextureStageState method with the D3DTSS_MAGFILTER render state 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 render state 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 render state value as the second parameter and one member of this enumeration as the third parameter.