Share via


D3DMX_FILTER Values

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

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

Syntax

#define D3DMX_FILTER_NONE      (1 << 0)
#define D3DMX_FILTER_POINT     (2 << 0)
#define D3DMX_FILTER_LINEAR    (3 << 0)
#define D3DMX_FILTER_TRIANGLE  (4 << 0)
#define D3DMX_FILTER_BOX       (5 << 0)
#define D3DMX_FILTER_MIRROR_U  (1 << 16)
#define D3DMX_FILTER_MIRROR_V  (2 << 16)
#define D3DMX_FILTER_MIRROR_W  (4 << 16)
#define D3DMX_FILTER_MIRROR    (7 << 16)
#define D3DMX_FILTER_DITHER    (8 << 16)

Remarks

The following table provides information about the flags used to describe filters.

Flag Description

D3DMX_FILTER_NONE

No scaling or filtering will take place. Pixels outside the bounds of the source image are assumed to be transparent black.

D3DMX_FILTER_POINT

Each destination pixel is computed by sampling the nearest pixel from the source image.

D3DMX_FILTER_LINEAR

Each destination pixel is computed by linearly interpolating between the nearest pixels in the source image. This filter works best when the scale on each axis is less than 2.

D3DMX_FILTER_TRIANGLE

Every pixel in the source image contributes equally to the destination image. This is the slowest of all the filters.

D3DMX_FILTER_BOX

Each pixel is computed by averaging a 2x2(x2) box of pixels from the source image. Only works when the dimensions of the destination are half those of the source.

D3DMX_FILTER_MIRROR_U

Indicates that pixels off the edge of the texture on the U-axis should be mirrored, not wrapped.

D3DMX_FILTER_MIRROR_V

Indicates that pixels off the edge of the texture on the V-axis should be mirrored, not wrapped.

D3DMX_FILTER_MIRROR_W

Indicates that pixels off the edge of the texture on the W-axis should be mirrored, not wrapped.

D3DMX_FILTER_MIRROR

Same as specifying D3DMX_FILTER_MIRROR_U, D3DMX_FILTER_MIRROR_V, and D3DMX_FILTER_MIRROR_V

D3DMX_FILTER_DITHER

Dithers the resulting image.

A valid filter must contain one of the flags shown in the following list.

  • D3DMX_FILTER_NONE
  • D3DMX_FILTER_POINT
  • D3DMX_FILTER_LINEAR
  • D3DMX_FILTER_TRIANGLE
  • D3DMX_FILTER_BOX

The following list shows optional filter flags. You can OR them with any filter.

  • D3DMX_FILTER_MIRROR_U
  • D3DMX_FILTER_MIRROR_V
  • D3DMX_FILTER_MIRROR_W
  • D3DMX_FILTER_MIRROR
  • D3DMX_FILTER_DITHER

Requirements

Header d3dmx.h
Windows Embedded CE Windows Embedded CE 6.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also

Reference

D3DMX Macros