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

# OMSetStencilRef

> Sets the reference value for depth stencil tests.

Sets the reference value for depth stencil tests.

## Syntax

```cpp theme={null}
void OMSetStencilRef(
    UINT StencilRef
)
```

### Parameters

*StencilRef \[in]*\
Type: UINT

Reference value to perform against when doing a depth-stencil test.

### Return value

Type: void

None.

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

[ID3D12GraphicsCommandList](/reference/graphics/d3d12_xs/interfaces/ID3D12GraphicsCommandList/id3d12graphicscommandlist_xs)


## Related topics

- [D3D12_DEPTH_STENCIL_DESC](/reference/graphics/d3d12/structs/d3d12_depth_stencil_desc_public.md)
- [D3D12_DEPTH_STENCIL_DESC1](/reference/graphics/d3d12/structs/d3d12_depth_stencil_desc1_public.md)
- [SetSamplePositions](/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist1/methods/id3d12graphicscommandlist1_setsamplepositions_public.md)
- [D3D12_DEPTH_STENCILOP_DESC](/reference/graphics/d3d12/structs/d3d12_depth_stencilop_desc_public.md)
- [OMSetRenderTargets](/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_omsetrendertargets_public.md)
