Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Specifies comparison options.
Syntax
typedef enum D3D12_COMPARISON_FUNC {
D3D12_COMPARISON_FUNC_NONE,
D3D12_COMPARISON_FUNC_NEVER = 1,
D3D12_COMPARISON_FUNC_LESS = 2,
D3D12_COMPARISON_FUNC_EQUAL = 3,
D3D12_COMPARISON_FUNC_LESS_EQUAL = 4,
D3D12_COMPARISON_FUNC_GREATER = 5,
D3D12_COMPARISON_FUNC_NOT_EQUAL = 6,
D3D12_COMPARISON_FUNC_GREATER_EQUAL = 7,
D3D12_COMPARISON_FUNC_ALWAYS = 8
} ;
Constants
D3D12_COMPARISON_FUNC_NEVERValue: 1 Never pass the comparison. |
D3D12_COMPARISON_FUNC_LESSValue: 2 If the source data is less than the destination data, the comparison passes. |
D3D12_COMPARISON_FUNC_EQUALValue: 3 If the source data is equal to the destination data, the comparison passes. |
D3D12_COMPARISON_FUNC_LESS_EQUALValue: 4 If the source data is less than or equal to the destination data, the comparison passes. |
D3D12_COMPARISON_FUNC_GREATERValue: 5 If the source data is greater than the destination data, the comparison passes. |
D3D12_COMPARISON_FUNC_NOT_EQUALValue: 6 If the source data is not equal to the destination data, the comparison passes. |
D3D12_COMPARISON_FUNC_GREATER_EQUALValue: 7 If the source data is greater than or equal to the destination data, the comparison passes. |
D3D12_COMPARISON_FUNC_ALWAYSValue: 8 Always pass the comparison. |
Remarks
A comparison option determines how the runtime compares source (new) data against destination (existing) data before storing the new data. The comparison option is declared in a description before an object is created. The API allows you to set a comparison option for
- a depth-stencil buffer (D3D12_DEPTH_STENCIL_DESC)
- depth-stencil operations (D3D12_DEPTH_STENCILOP_DESC)
- sampler state (D3D12_SAMPLER_DESC)
Requirements
| Requirement | Value |
|---|---|
| Header | d3d12.h |