struttura D3D12_DEPTH_STENCIL_DESC (d3d12.h)

Descrive lo stato depth-stencil.

Sintassi

typedef struct D3D12_DEPTH_STENCIL_DESC {
  BOOL                       DepthEnable;
  D3D12_DEPTH_WRITE_MASK     DepthWriteMask;
  D3D12_COMPARISON_FUNC      DepthFunc;
  BOOL                       StencilEnable;
  UINT8                      StencilReadMask;
  UINT8                      StencilWriteMask;
  D3D12_DEPTH_STENCILOP_DESC FrontFace;
  D3D12_DEPTH_STENCILOP_DESC BackFace;
} D3D12_DEPTH_STENCIL_DESC;

Members

DepthEnable

Specifica se abilitare il test di profondità. Impostare questo membro su TRUE per abilitare il test di profondità.

DepthWriteMask

Valore tipizzato D3D12_DEPTH_WRITE_MASK che identifica una parte del buffer depth-stencil che può essere modificato dai dati di profondità.

DepthFunc

Valore tipizzato D3D12_COMPARISON_FUNC che identifica una funzione che confronta i dati di profondità con i dati di profondità esistenti.

StencilEnable

Specifica se abilitare il test degli stencil. Impostare questo membro su TRUE per abilitare il test degli stencil.

StencilReadMask

Identificare una parte del buffer depth-stencil per la lettura dei dati degli stencil.

StencilWriteMask

Identificare una parte del buffer depth-stencil per la scrittura dei dati degli stencil.

FrontFace

Struttura D3D12_DEPTH_STENCILOP_DESC che descrive come usare i risultati del test di profondità e il test degli stencil per i pixel la cui superficie normale è rivolta verso la fotocamera.

BackFace

Struttura D3D12_DEPTH_STENCILOP_DESC che descrive come usare i risultati del test di profondità e il test degli stencil per i pixel la cui superficie normale si trova lontano dalla fotocamera.

Commenti

Un oggetto D3D12_GRAPHICS_PIPELINE_STATE_DESC contiene una struttura depth-stencil-state che controlla la modalità di esecuzione dei test depth-stencil dalla fase di unione dell'output.

Questa tabella mostra i valori predefiniti degli stati depth-stencil.

State Valore predefinito
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.StencilFailOp

e

BackFace.StencilFailOp

D3D12_STENCIL_OP_KEEP
FrontFace.StencilDepthFailOp

e

BackFace.StencilDepthFailOp

D3D12_STENCIL_OP_KEEP
FrontFace.StencilPassOp

e

BackFace.StencilPassOp

D3D12_STENCIL_OP_KEEP
FrontFace.StencilFunc

e

BackFace.StencilFunc

D3D12_COMPARISON_FUNC_ALWAYS
 

I formati che supportano lo stenciling sono DXGI_FORMAT_D24_UNORM_S8_UINT e DXGI_FORMAT_D32_FLOAT_S8X24_UINT.

Requisiti

   
Intestazione d3d12.h

Vedi anche

CD3DX12_DEPTH_STENCIL_DESC

Strutture principali