> ## 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_STATIC_SAMPLER_DESC

> Describes a static sampler.

Describes a static sampler.

## Syntax

```cpp theme={null}
typedef struct D3D12_STATIC_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;
    D3D12_STATIC_BORDER_COLOR BorderColor;
    FLOAT MinLOD;
    FLOAT MaxLOD;
    UINT ShaderRegister;
    UINT RegisterSpace;
    D3D12_SHADER_VISIBILITY ShaderVisibility;
} D3D12_STATIC_SAMPLER_DESC
```

### Members

*Filter*\
Type: D3D12\_FILTER

The filtering method to use when sampling a texture, as a [D3D12\_FILTER](/reference/graphics/d3d12/enums/d3d12_filter_public) enumeration constant.

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

Specifies the [D3D12\_TEXTURE\_ADDRESS\_MODE](/reference/graphics/d3d12_x/enums/d3d12_texture_address_mode) mode to use for resolving a <i>u</i> texture coordinate that is outside the 0 to 1 range.

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

Specifies the [D3D12\_TEXTURE\_ADDRESS\_MODE](/reference/graphics/d3d12_x/enums/d3d12_texture_address_mode) mode to use for resolving a <i>v</i> texture coordinate that is outside the 0 to 1 range.

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

Specifies the [D3D12\_TEXTURE\_ADDRESS\_MODE](/reference/graphics/d3d12_x/enums/d3d12_texture_address_mode) mode to use for resolving a <i>w</i> texture coordinate that is outside the 0 to 1 range.

*MipLODBias*\
Type: FLOAT

Offset from the calculated mipmap level. For example, if Direct3D calculates that a texture should be sampled at mipmap level 3 and MipLODBias is 2, then 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 as the filter. Valid values are between 1 and 16.

*ComparisonFunc*\
Type: D3D12\_COMPARISON\_FUNC

A function that compares sampled data against existing sampled data.
The function options are listed in [D3D12\_COMPARISON\_FUNC](/reference/graphics/d3d12/enums/d3d12_comparison_func_public).

*BorderColor*\
Type: D3D12\_STATIC\_BORDER\_COLOR

One member of [D3D12\_STATIC\_BORDER\_COLOR](/reference/graphics/d3d12/enums/d3d12_static_border_color_public), the border color to use if D3D12\_TEXTURE\_ADDRESS\_MODE\_BORDER 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 to a large value such as D3D12\_FLOAT32\_MAX.

*ShaderRegister*\
Type: UINT

The <i>ShaderRegister</i> and <i>RegisterSpace</i> parameters correspond to the binding syntax of HLSL.  For example, in HLSL:

```syntax theme={null}
Texture2D&lt;float4&gt; a : register(t2, space3);
```

This corresponds to a  <i>ShaderRegister</i> of 2 (indicating the type is SRV), and <i>RegisterSpace</i> is 3.

The  <i>ShaderRegister</i> and <i>RegisterSpace</i> pair is needed to establish correspondence between shader resources and runtime heap descriptors, using the root signature data structure.

*RegisterSpace*\
Type: UINT

See the description for <i>ShaderRegister</i>.
Register space is optional; the default register space is 0.

*ShaderVisibility*\
Type: D3D12\_SHADER\_VISIBILITY

Specifies the visibility of the sampler to the pipeline shaders, one member of [D3D12\_SHADER\_VISIBILITY](/reference/graphics/d3d12/enums/d3d12_shader_visibility_public).

## Remarks

Use this structure with the [D3D12\_ROOT\_SIGNATURE\_DESC](/reference/graphics/d3d12/structs/d3d12_root_signature_desc_public) structure.

## 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

[CD3DX12\_STATIC\_SAMPLER\_DESC](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/cd3dx12-static-sampler-desc)

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


## Related topics

- [D3D12_ROOT_SIGNATURE_DESC](/reference/graphics/d3d12/structs/d3d12_root_signature_desc_public.md)
- [D3D12_ROOT_SIGNATURE_DESC1](/reference/graphics/d3d12/structs/d3d12_root_signature_desc1_public.md)
- [D3D12_STATIC_BORDER_COLOR](/reference/graphics/d3d12/enums/d3d12_static_border_color_public.md)
- [D3D12_SAMPLER_DESC](/reference/graphics/d3d12/structs/d3d12_sampler_desc_public.md)
- [D3D12_DESCRIPTOR_RANGE_TYPE](/reference/graphics/d3d12/enums/d3d12_descriptor_range_type_public.md)
