D3DX11_FILTER_FLAG enumeration
Note
The D3DX (D3DX 9, D3DX 10, and D3DX 11) utility library is deprecated for Windows 8 and is not supported for Windows Store apps.
Texture filtering flags.
Syntax
typedef enum D3DX11_FILTER_FLAG {
D3DX11_FILTER_NONE = (1 << 0),
D3DX11_FILTER_POINT = (2 << 0),
D3DX11_FILTER_LINEAR = (3 << 0),
D3DX11_FILTER_TRIANGLE = (4 << 0),
D3DX11_FILTER_BOX = (5 << 0),
D3DX11_FILTER_MIRROR_U = (1 << 16),
D3DX11_FILTER_MIRROR_V = (2 << 16),
D3DX11_FILTER_MIRROR_W = (4 << 16),
D3DX11_FILTER_MIRROR = (7 << 16),
D3DX11_FILTER_DITHER = (1 << 19),
D3DX11_FILTER_DITHER_DIFFUSION = (2 << 19),
D3DX11_FILTER_SRGB_IN = (1 << 21),
D3DX11_FILTER_SRGB_OUT = (2 << 21),
D3DX11_FILTER_SRGB = (3 << 21)
} D3DX11_FILTER_FLAG, *LPD3DX11_FILTER_FLAG;
Constants
-
D3DX11_FILTER_NONE
-
No scaling or filtering will take place. Pixels outside the bounds of the source image are assumed to be transparent black.
-
D3DX11_FILTER_POINT
-
Each destination pixel is computed by sampling the nearest pixel from the source image.
-
D3DX11_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.
-
D3DX11_FILTER_TRIANGLE
-
Every pixel in the source image contributes equally to the destination image. This is the slowest of the filters.
-
D3DX11_FILTER_BOX
-
Each pixel is computed by averaging a 2x2(x2) 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.
-
D3DX11_FILTER_MIRROR_U
-
Pixels off the edge of the texture on the u-axis should be mirrored, not wrapped.
-
D3DX11_FILTER_MIRROR_V
-
Pixels off the edge of the texture on the v-axis should be mirrored, not wrapped.
-
D3DX11_FILTER_MIRROR_W
-
Pixels off the edge of the texture on the w-axis should be mirrored, not wrapped.
-
D3DX11_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.
-
D3DX11_FILTER_DITHER
-
The resulting image must be dithered using a 4x4 ordered dither algorithm. This happens when converting from one format to another.
-
D3DX11_FILTER_DITHER_DIFFUSION
-
Do diffuse dithering on the image when changing from one format to another.
-
D3DX11_FILTER_SRGB_IN
-
Input data is in standard RGB (sRGB) color space. See remarks.
-
D3DX11_FILTER_SRGB_OUT
-
Output data is in standard RGB (sRGB) color space. See remarks.
-
D3DX11_FILTER_SRGB
-
Same as specifying D3DX_FILTER_SRGB_IN | D3DX_FILTER_SRGB_OUT. See remarks.
Remarks
D3DX11 automatically performs gamma correction (to convert color data from RGB space to standard RGB space) when loading texture data. This is automatically done for instance when RGB data is loaded from a .png file into an sRGB texture. Use the SRGB filter flags to indicate if the data does not need to be converted into sRGB space.
Requirements
Requirement | Value |
---|---|
Header |
|