Identify a technique for resolving texture coordinates that are outside of the boundaries of a texture.
typedef enum D3D11_TEXTURE_ADDRESS_MODE
{
D3D11_TEXTURE_ADDRESS_WRAP,
D3D11_TEXTURE_ADDRESS_MIRROR,
D3D11_TEXTURE_ADDRESS_CLAMP,
D3D11_TEXTURE_ADDRESS_BORDER,
D3D11_TEXTURE_ADDRESS_MIRROR_ONCE,
D3D11_TEXTURE_ADDRESS_HALF_BORDER,
D3D11_TEXTURE_ADDRESS_MIRROR_ONCE_BORDER,
D3D11_TEXTURE_ADDRESS_MIRROR_ONCE_HALF_BORDER
} D3D11_TEXTURE_ADDRESS_MODE;
| Constant | Description |
|---|---|
| D3D11_TEXTURE_ADDRESS_WRAP | Tile the texture at every (u,v) integer junction. For example, for u values between 0 and 3, the texture is repeated three times. |
| D3D11_TEXTURE_ADDRESS_MIRROR | Flip the texture at every (u,v) integer junction. For u values between 0 and 1, for example, the texture is addressed normally; between 1 and 2, the texture is flipped (mirrored); between 2 and 3, the texture is normal again; and so on. |
| D3D11_TEXTURE_ADDRESS_CLAMP | Texture coordinates outside the range [0.0, 1.0] are set to the texture color at 0.0 or 1.0, respectively. |
| D3D11_TEXTURE_ADDRESS_BORDER | Texture coordinates outside the range [0.0, 1.0] are set to the border color specified in D3D11_SAMPLER_DESC or HLSL code. |
| D3D11_TEXTURE_ADDRESS_MIRROR_ONCE | Similar to D3D11_TEXTURE_ADDRESS_MIRROR and D3D11_TEXTURE_ADDRESS_CLAMP. Takes the absolute value of the texture coordinate (thus, mirroring around 0), and then clamps to the maximum value. |
| D3D11_TEXTURE_ADDRESS_HALF_BORDER | Not implemented. Half border. |
| D3D11_TEXTURE_ADDRESS_MIRROR_ONCE_BORDER | Not implemented. Mirror once border. |
| D3D11_TEXTURE_ADDRESS_MIRROR_ONCE_HALF_BORDER | Not implemented. Mirror once half border. |
Header: Declared in d3d11_x.h (d3d11.h on other Windows platforms).
Library: Use d3d11_x.lib (d3d11.lib on other Windows platforms).