Identifies a technique for resolving texture coordinates that are outside of the boundaries of a texture.
typedef enum D3D12_TEXTURE_ADDRESS_MODE
{
D3D12_TEXTURE_ADDRESS_MODE_WRAP = 1,
D3D12_TEXTURE_ADDRESS_MODE_MIRROR = 2,
D3D12_TEXTURE_ADDRESS_MODE_CLAMP = 3,
D3D12_TEXTURE_ADDRESS_MODE_BORDER = 4,
D3D12_TEXTURE_ADDRESS_MODE_MIRROR_ONCE = 5,
D3D12XBOX_TEXTURE_ADDRESS_MODE_HALF_BORDER = 6,
D3D12XBOX_TEXTURE_ADDRESS_MODE_MIRROR_ONCE_BORDER = 7,
D3D12XBOX_TEXTURE_ADDRESS_MODE_MIRROR_ONCE_HALF_BORDER = 8
} D3D12_TEXTURE_ADDRESS_MODE;
| Constant | Description |
|---|---|
| D3D12_TEXTURE_ADDRESS_MODE_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. |
| D3D12_TEXTURE_ADDRESS_MODE_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. |
| D3D12_TEXTURE_ADDRESS_MODE_CLAMP | Texture coordinates outside the range [0.0, 1.0] are set to the texture color at 0.0 or 1.0, respectively. |
| D3D12_TEXTURE_ADDRESS_MODE_BORDER | Texture coordinates outside the range [0.0, 1.0] are set to the border color specified in D3D12_SAMPLER_DESC or HLSL code. |
| D3D12_TEXTURE_ADDRESS_MODE_MIRROR_ONCE | Similar to D3D12_TEXTURE_ADDRESS_MODE_MIRROR and D3D12_TEXTURE_ADDRESS_MODE_CLAMP. Takes the absolute value of the texture coordinate (thus, mirroring around 0), and then clamps to the maximum value. |
| D3D12XBOX_TEXTURE_ADDRESS_MODE_HALF_BORDER | Border is applied for texture coordinates outside [0.5, 1.5]. |
| D3D12XBOX_TEXTURE_ADDRESS_MODE_MIRROR_ONCE_BORDER | Mirror the texture once then switch to border color. |
| D3D12XBOX_TEXTURE_ADDRESS_MODE_MIRROR_ONCE_HALF_BORDER | Mirror the texture once then switch to TEXTURE_ADDRESS_HALF_BORDER. |
Header: Declared in d3d12_x.h.