enum TEX_FILTER_FLAGS
{
TEX_FILTER_DEFAULT = 0,
TEX_FILTER_SEPARATE_ALPHA = 0x100,
TEX_FILTER_DITHER = 0x10000,
TEX_FILTER_DITHER_DIFFUSION = 0x20000,
TEX_FILTER_POINT = 0x100000,
TEX_FILTER_LINEAR = 0x200000,
TEX_FILTER_CUBIC = 0x300000,
TEX_FILTER_FANT = 0x400000,
TEX_FILTER_BOX,
TEX_FILTER_TRIANGLE,
TEX_FILTER_WRAP_U,
TEX_FILTER_WRAP_V,
TEX_FILTER_WRAP_W,
TEX_FILTER_WRAP,
TEX_FILTER_MIRROR_U,
TEX_FILTER_MIRROR_V,
TEX_FILTER_MIRROR_W,
TEX_FILTER_MIRROR,
TEX_FILTER_SRGB_IN = 0x1000000,
TEX_FILTER_SRGB_OUT = 0x2000000,
TEX_FILTER_SRGB = 0x3000000,
TEX_FILTER_FORCE_NON_WIC,
TEX_FILTER_FORCE_WIC,
TEX_FILTER_RGB_COPY_RED,
TEX_FILTER_RGB_COPY_GREEN,
TEX_FILTER_RGB_COPY_BLUE
};
| Constant | Description |
|---|---|
| TEX_FILTER_DEFAULT | Default flags. |
| TEX_FILTER_SEPARATE_ALPHA | WIC makes use of pre-multiplied alpha when resizing images, which works fine for standard transparency data. If the alpha channel, however, contains some other kind of value, then the resulting image can have ‘holes’ in it. Use of this flag uses an alternative algorithm which resizes the RGB and alpha channels independently and then recombines the result. |
| TEX_FILTER_DITHER | About the dithering flags: the dithering flags select the use of dithering for format conversions; by default, TEX filtering uses no dithering. This flag selects 4x4 dithering. |
| TEX_FILTER_DITHER_DIFFUSION | Selects error-diffusion dithering. This is also known as Floyd–Steinberg dithering; see http://en.wikipedia.org/wiki/Floyd%E2%80%93Steinberg_dithering. |
| TEX_FILTER_POINT | About the point, linear, cubic, fant, box, and triangle flags: This set of flags selects the filtering mode used for resizing and mipmap generation. In most cases it defaults to using “Fant” (equivalent to “Box”). The legacy D3DX library implemented Point, Linear, Box, and Triangle. This flag selects the nearest neighbor filtering mode. |
| TEX_FILTER_LINEAR | Selects linear filtering mode. |
| TEX_FILTER_CUBIC | Selects cubic filtering mode. |
| TEX_FILTER_FANT | Selects faint filtering mode. This is equivalent to a box filter for down-sampling. |
| TEX_FILTER_BOX | Selects box filtering mode. This is an alias for TEX_FILTER_FANT, since they are equivalent for down-scaling. |
| TEX_FILTER_TRIANGLE | Selects finite low-pass triangle filter mode. |
| TEX_FILTER_WRAP_U | About WRAP and MIRROR flags: This controls how edge pixels are filtered. It defaults to CLAMP, which is the only one supported by the WIC code paths. These have no impact on POINT or BOX filtering methods. This flag selects texture address map in U. |
| TEX_FILTER_WRAP_V | This flag selects texture address map in V. |
| TEX_FILTER_WRAP_W | This flag selects texture address map in W. |
| TEX_FILTER_WRAP | These indicate the texture will be used with wrap texture addressing modes D3D11_TEXTURE_ADDRESS_WRAP in U, V, and/or W. This affects Linear, Cubic, and Triangle filtering. |
| TEX_FILTER_MIRROR_U | Mirror texture addressing modes in U. |
| TEX_FILTER_MIRROR_V | Mirror texture addressing modes in V. |
| TEX_FILTER_MIRROR_W | Mirror texture addressing modes in W. |
| TEX_FILTER_MIRROR | These indicate the texture will be used with mirror texture addressing modes D3D11_TEXTURE_ADDRESS_MIRROR in U, V, and/or W. This affects Cubic filtering. For Linear and Triangle filtering, MIRROR and the default of clamp give the same result. |
| TEX_FILTER_SRGB_IN | About the SRGB flags: This controls color space transformation for conversions. The sRGB color space overall is approximately equivalent to gamma 2.2. It’s actually linear below a threshold, and gamma 2.4 beyond that. http://en.wikipedia.org/wiki/SRGB This flag indicates that the input format is the sRGB (gamma 2.2) format. This is implied if using a DXGI_FORMAT_*_SRGB format. |
| TEX_FILTER_SRGB_OUT | This flag indicates that the output format is the sRGB (gamma 2.2) format. This is implied if using a DXGI_FORMAT_*_SRGB format. |
| TEX_FILTER_SRGB | Setting this flag is the same as setting both TEX_FILTER_SRGB_IN and TEX_FILTER_SRGB_OUT. |
| TEX_FILTER_FORCE_NON_WIC | About the NON_WIC and WIC flags: When both non-WIC based and WIC-based codepaths are in place, these flags can influence the standard logic choice. These are primarily used for testing and debugging purposes. This flag selects the NON-WIC code path. |
| TEX_FILTER_FORCE_WIC | This flag selects the WIC code path. |
| TEX_FILTER_RGB_COPY_RED | About these RGB_COPY_RED/GREEN/BLUE flags: For Convert operations, these RED/GREEN/BLUE flags control special-case logic in the non-WIC paths. Without these flags, RGB to R conversion defaults to converting to a luminance value, and RGB to RG conversion defaults to copying the RED and GREEN channels. These are implemented in the non-WIC code paths. When converting from RGB to R formats, this RED flag indicates that the RED channel could be copied. For RGB to RG conversions, this flag can be combined with GREEN or BLUE to control which channels end up in the output. |
| TEX_FILTER_RGB_COPY_GREEN | When converting from RGB to R formats, this flag indicates that the GREEN channel could be copied. For RGB to RG conversions, this flag can be combined with RED or BLUE to control which channels end up in the output. |
| TEX_FILTER_RGB_COPY_BLUE | When converting from RGB to R formats, this indicates that the BLUE channel could be copied. For RGB to RG conversions, this flag can be combined with RED or GREEN to control which channels end up in the output. |
See also Codeplex: https://directxtex.codeplex.com/wikipage?title=Filter%20Flags
Header: Declared in directxtex.h.