Syntax
Members
DepthEnableType: BOOL Specifies whether to enable depth testing. Set this member to TRUE to enable depth testing. DepthWriteMask
Type: D3D12_DEPTH_WRITE_MASK A D3D12_DEPTH_WRITE_MASK-typed value that identifies a portion of the depth-stencil buffer that can be modified by depth data. DepthFunc
Type: D3D12_COMPARISON_FUNC A D3D12_COMPARISON_FUNC-typed value that identifies a function that compares depth data against existing depth data. StencilEnable
Type: BOOL Specifies whether to enable stencil testing. Set this member to TRUE to enable stencil testing. StencilReadMask
Type: UINT8 Identify a portion of the depth-stencil buffer for reading stencil data. StencilWriteMask
Type: UINT8 Identify a portion of the depth-stencil buffer for writing stencil data. FrontFace
Type: D3D12_DEPTH_STENCILOP_DESC A D3D12_DEPTH_STENCILOP_DESC structure that describes how to use the results of the depth test and the stencil test for pixels whose surface normal is facing towards the camera. BackFace
Type: D3D12_DEPTH_STENCILOP_DESC A D3D12_DEPTH_STENCILOP_DESC structure that describes how to use the results of the depth test and the stencil test for pixels whose surface normal is facing away from the camera.
Remarks
A D3D12_GRAPHICS_PIPELINE_STATE_DESC object contains a depth-stencil-state structure that controls how depth-stencil testing is performed by the output-merger stage. This table shows the default values of depth-stencil states.| State | Default Value |
|---|---|
| DepthEnable | TRUE |
| DepthWriteMask | D3D12_DEPTH_WRITE_MASK_ALL |
| DepthFunc | D3D12_COMPARISON_FUNC_LESS |
| StencilEnable | FALSE |
| StencilReadMask | D3D12_DEFAULT_STENCIL_READ_MASK |
| StencilWriteMask | D3D12_DEFAULT_STENCIL_WRITE_MASK |
| FrontFace.StencilFailOpandBackFace.StencilFailOp | D3D12_STENCIL_OP_KEEP |
| FrontFace.StencilDepthFailOpandBackFace.StencilDepthFailOp | D3D12_STENCIL_OP_KEEP |
| FrontFace.StencilPassOpandBackFace.StencilPassOp | D3D12_STENCIL_OP_KEEP |
| FrontFace.StencilFuncandBackFace.StencilFunc | D3D12_COMPARISON_FUNC_ALWAYS |
Requirements
Header: d3d12_xs.h or d3d12_x.hLibrary: d3d12_xs.lib or d3d12_x.lib
Supported Platforms: XBOX Series consoles and XBOX One family
