> ## 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](/zh-TW/reference/graphics/d3d12_xs/interfaces/ID3D12GraphicsCommandList/id3d12graphicscommandlist_xs)


## Related topics

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