?/TD>
Microsoft DirectX 9.0

D3DX_FILTER


The following flags are used to specify which channels in a texture to operate on.

#defineDescription
D3DX_FILTER_NONENo scaling or filtering will take place. Pixels outside the bounds of the source image are assumed to be transparent black.
D3DX_FILTER_POINTEach destination pixel is computed by sampling the nearest pixel from the source image.
D3DX_FILTER_LINEAREach 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_TRIANGLEEvery pixel in the source image contributes equally to the destination image. This is the slowest of the filters.
D3DX_FILTER_BOXEach pixel is computed by averaging a 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_UPixels off the edge of the texture on the u-axis should be mirrored, not wrapped.
D3DX_FILTER_MIRROR_VPixels off the edge of the texture on the v-axis should be mirrored, not wrapped.
D3DX_FILTER_MIRROR_WPixels off the edge of the texture on the w-axis should be mirrored, not wrapped.
D3DX_FILTER_MIRRORSpecifying this flag is the same as specifying the D3DX_FILTER_MIRROR_U, D3DX_FILTER_MIRROR_V, and D3DX_FILTER_MIRROR_W flags.
D3DX_FILTER_DITHERThe resulting image must be dithered using a 4x4 ordered dither algorithm.
D3DX_FILTER_SRGB_INInput data is in sRGB (gamma 2.2) color space.
D3DX_FILTER_SRGB_OUTThe output data is in sRGB (gamma 2.2) color space.
D3DX_FILTER_SRGBSame as specifying D3DX_FILTER_SRGB_IN | D3DX_FILTER_SRGB_OUT.

Each valid filter must contain exactly one of the following flags: D3DX_FILTER_NONE, D3DX_FILTER_POINT, D3DX_FILTER_LINEAR, D3DX_FILTER_TRIANGLE, or 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, D3DX_FILTER_SRGB_IN, D3DX_FILTER_SRGB_OUT or D3DX_FILTER_SRGB.

Specifying D3DX_DEFAULT for this parameter is usually the equivalent of specifying D3DX_FILTER_TRIANGLE | D3DX_FILTER_DITHER. However, D3DX_DEFAULT can have different meanings, depending on which method uses the filter. For example:

Reference each method to check for information about how D3DX_DEFAULT filter is mapped.

Constant Information

Headerd3dx9tex.h
Minimum operating systemWindows 98


© 2002 Microsoft Corporation. All rights reserved.