> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# D3D12_SAMPLER_DESC

> Describes a sampler state. (D3D12_SAMPLER_DESC)

Describes a sampler state.

## Syntax

```cpp theme={null}
typedef struct D3D12_SAMPLER_DESC
{
    D3D12_FILTER Filter;
    D3D12_TEXTURE_ADDRESS_MODE AddressU;
    D3D12_TEXTURE_ADDRESS_MODE AddressV;
    D3D12_TEXTURE_ADDRESS_MODE AddressW;
    FLOAT MipLODBias;
    UINT MaxAnisotropy;
    D3D12_COMPARISON_FUNC ComparisonFunc;
    FLOAT BorderColor;
    FLOAT MinLOD;
    FLOAT MaxLOD;
} D3D12_SAMPLER_DESC
```

### Members

*Filter*\
Type: D3D12\_FILTER

A [D3D12\_FILTER](/reference/graphics/d3d12/enums/d3d12_filter_public)-typed value that specifies the filtering method to use when sampling a texture.

*AddressU*\
Type: D3D12\_TEXTURE\_ADDRESS\_MODE

A [D3D12\_TEXTURE\_ADDRESS\_MODE](/reference/graphics/d3d12_x/enums/d3d12_texture_address_mode)-typed value that specifies the method to use for resolving a u texture coordinate that is outside the 0 to 1 range.

*AddressV*\
Type: D3D12\_TEXTURE\_ADDRESS\_MODE

A [D3D12\_TEXTURE\_ADDRESS\_MODE](/reference/graphics/d3d12_x/enums/d3d12_texture_address_mode)-typed value that specifies the method to use for resolving a v texture coordinate that is outside the 0 to 1 range.

*AddressW*\
Type: D3D12\_TEXTURE\_ADDRESS\_MODE

A [D3D12\_TEXTURE\_ADDRESS\_MODE](/reference/graphics/d3d12_x/enums/d3d12_texture_address_mode)-typed value that specifies the method to use for resolving a w texture coordinate that is outside the 0 to 1 range.

*MipLODBias*\
Type: FLOAT

Offset from the calculated mipmap level. For example, if the runtime calculates that a texture should be sampled at mipmap level 3 and **MipLODBias** is 2, the texture will be sampled at mipmap level 5.

*MaxAnisotropy*\
Type: UINT

Clamping value used if **D3D12\_FILTER\_ANISOTROPIC** or **D3D12\_FILTER\_COMPARISON\_ANISOTROPIC** is specified in **Filter**. Valid values are between 1 and 16.

*ComparisonFunc*\
Type: D3D12\_COMPARISON\_FUNC

A [D3D12\_COMPARISON\_FUNC](/reference/graphics/d3d12/enums/d3d12_comparison_func_public)-typed value that specifies a function that compares sampled data against existing sampled data.

*BorderColor*\
Type: FLOAT\[4]

RGBA border color to use if [D3D12\_TEXTURE\_ADDRESS\_MODE\_BORDER](/reference/graphics/d3d12_x/enums/d3d12_texture_address_mode) is specified for **AddressU**, **AddressV**, or **AddressW**. Range must be between 0.0 and 1.0 inclusive.

*MinLOD*\
Type: FLOAT

Lower end of the mipmap range to clamp access to, where 0 is the largest and most detailed mipmap level and any level higher than that is less detailed.

*MaxLOD*\
Type: FLOAT

Upper end of the mipmap range to clamp access to, where 0 is the largest and most detailed mipmap level and any level higher than that is less detailed. This value must be greater than or equal to **MinLOD**. To have no upper limit on LOD, set this member to a large value.

## Remarks

This structure is used by [CreateSampler](/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_createsampler_public).

## Requirements

**Header:** d3d12\_xs.h or d3d12\_x.h\
**Library:** d3d12\_xs.lib or d3d12\_x.lib\
**Supported Platforms**: XBOX Series consoles and XBOX One family

## See Also

[Core Structures](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/direct3d-12-structures)


## Related topics

- [CreateSampler](/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_createsampler_public.md)
- [D3D12_COMPARISON_FUNC](/reference/graphics/d3d12/enums/d3d12_comparison_func_public.md)
- [D3D12_FILTER_TYPE](/reference/graphics/d3d12/enums/d3d12_filter_type_public.md)
- [D3D12_FILTER_REDUCTION_TYPE](/reference/graphics/d3d12/enums/d3d12_filter_reduction_type_public.md)
- [D3D12_FILTER](/reference/graphics/d3d12/enums/d3d12_filter_public.md)
