D3DX_FILTER Flags
Flags used to control filtering of an image.
#define D3DX_FILTER_NONE (1 << 0)
#define D3DX_FILTER_POINT (2 << 0)
#define D3DX_FILTER_LINEAR (3 << 0)
#define D3DX_FILTER_TRIANGLE (4 << 0)
#define D3DX_FILTER_BOX (5 << 0)
#define D3DX_FILTER_MIRROR_U (1 << 16)
#define D3DX_FILTER_MIRROR_V (2 << 16)
#define D3DX_FILTER_MIRROR_W (4 << 16)
#define D3DX_FILTER_MIRROR (7 << 16)
#define D3DX_FILTER_DITHER (8 << 16)
Constants
- D3DX_FILTER_NONE
- No scaling or filtering will take place. Pixels outside the bounds of the source image are assumed to be transparent black.
- D3DX_FILTER_POINT
- Each destination pixel is computed by sampling the nearest pixel from the source image.
- D3DX_FILTER_LINEAR
- Each destination pixel is computed by sampling the four nearest pixels from the source image. This filter works best when the scale on both axes is less than two.
- D3DX_FILTER_TRIANGLE
- Every pixel in the source image contributes equally to the destination image. This is the slowest of the filters.
- D3DX_FILTER_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.
- D3DX_FILTER_MIRROR_U
- Pixels off the edge of the texture on the u-axis should be mirrored, not wrapped.
- D3DX_FILTER_MIRROR_V
- Pixels off the edge of the texture on the v-axis should be mirrored, not wrapped.
- D3DX_FILTER_MIRROR_W
- Pixels off the edge of the texture on the w-axis should be mirrored, not wrapped.
- D3DX_FILTER_MIRROR
- Specifying this flag is the same as specifying the D3DX_FILTER_MIRROR_U, D3DX_FILTER_MIRROR_V, and D3DX_FILTER_MIRROR_W flags.
- D3DX_FILTER_DITHER
- The resulting image must be dithered using a 4x4 ordered dither algorithm.
Remarks
Each valid filter must contain exactly one of the following flags: D3DX_FILTER_NONE, D3DX_FILTER_POINT, D3DX_FILTER_LINEAR, D3DX_FILTER_TRIANGLE, D3DX_FILTER_BOX. In addition, you can use the OR operator to specify zero or more of the following optional flags with a valid filter: D3DX_FILTER_MIRROR_U, D3DX_FILTER_MIRROR_V, D3DX_FILTER_MIRROR_W, D3DX_FILTER_MIRROR, D3DX_FILTER_DITHER.
Specifying D3DX_DEFAULT for this parameter is the equivalent of specifying D3DX_FILTER_TRIANGLE | D3DX_FILTER_DITHER.
Requirements
Header: Declared in D3dx8tex.h.