ID3D12GraphicsCommandList1::OMSetDepthBounds method (d3d12.h)

This method enables you to change the depth bounds dynamically.

Syntax

void OMSetDepthBounds(
  [in] FLOAT Min,
  [in] FLOAT Max
);

Parameters

[in] Min

Type: FLOAT

SAL: In

Specifies the minimum depth bounds. The default value is 0. NaN values silently convert to 0.

[in] Max

Type: FLOAT

SAL: In

Specifies the maximum depth bounds. The default value is 1. NaN values silently convert to 0.

Return value

None

Remarks

Depth-bounds testing allows pixels and samples to be discarded if the currently-stored depth value is outside the range specified by Min and Max, inclusive. If the currently-stored depth value of the pixel or sample is inside this range, then the depth-bounds test passes and it is rendered; otherwise, the depth-bounds test fails and the pixel or sample is discarded. Note that the depth-bounds test considers the currently-stored depth value, not the depth value generated by the executing pixel shader.

To use depth-bounds testing, the application must use the new CreatePipelineState method to enable depth-bounds testing on the PSO and then can use this command list method to change the depth-bounds dynamically.

OMSetDepthBounds is an optional feature. Use the CheckFeatureSupport method to determine whether or not this feature is supported by the user-mode driver. Support for this feature is reported through the D3D12_FEATURE_D3D12_OPTIONS2 structure.

Requirements

Requirement Value
Target Platform Windows
Header d3d12.h
Library D3d12.lib
DLL D3d12.dll

See also

ID3D12GraphicsCommandList1