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

> 设置深度模板测试的参考值。

设置深度模板测试的参考值。

## 语法

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

### 参数

*StencilRef \[in]*\
类型：UINT

进行深度模板测试时使用的参考值。

### 返回值

类型：void

无。

## 要求

**头文件：** d3d12\_xs.h 或 d3d12\_x.h\
**库：** d3d12\_xs.lib 或 d3d12\_x.lib\
**支持的平台**：XBOX Series 主机和 XBOX One 系列

## 另请参阅

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


## Related topics

- [D3D12_DEPTH_STENCIL_DESC](/zh-CN/reference/graphics/d3d12/structs/d3d12_depth_stencil_desc_public.md)
- [CreateDepthStencilView](/zh-CN/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_createdepthstencilview_public.md)
- [D3D12_DEPTH_STENCIL_DESC1](/zh-CN/reference/graphics/d3d12/structs/d3d12_depth_stencil_desc1_public.md)
- [D3D12_DEPTH_STENCIL_VALUE](/zh-CN/reference/graphics/d3d12/structs/d3d12_depth_stencil_value_public.md)
- [D3D12_DEPTH_STENCIL_VIEW_DESC](/zh-CN/reference/graphics/d3d12/structs/d3d12_depth_stencil_view_desc_public.md)
