> ## 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.

# OMSetDepthBounds

> This method enables you to change the depth bounds dynamically.

This method enables you to change the depth bounds dynamically.

## Syntax

```cpp theme={null}
void OMSetDepthBounds(
    FLOAT Min,
    FLOAT Max
)
```

### Parameters

*Min \[in]*\
Type: FLOAT

[SAL](https://learn.microsoft.com/en-us/visualstudio/code-quality/annotating-function-parameters-and-return-values): <code>*In*</code>

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

*Max \[in]*\
Type: FLOAT

[SAL](https://learn.microsoft.com/en-us/visualstudio/code-quality/annotating-function-parameters-and-return-values): <code>*In*</code>

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

### Return value

Type: void

None.

## Remarks

Depth-bounds testing allows pixels and samples to be discarded if the currently-stored depth value is outside the range specified by <i>Min</i> and <i>Max</i>, 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](/reference/graphics/d3d12/interfaces/id3d12device2/methods/id3d12device2_createpipelinestate_public) 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](/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_checkfeaturesupport_public) 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](/reference/graphics/d3d12/enums/d3d12_feature_public) structure.

## Requirements

**Header:** d3d12\_xs.h or d3d12\_x.h\
**Library:** d3d12\_xs.lib or d3d12\_x.lib\
**Supported Platforms**: XBOX Series consoles and XBOX One family

## See Also

[ID3D12GraphicsCommandList1](/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist1/id3d12graphicscommandlist1_public)


## Related topics

- [D3D12_DEPTH_STENCIL_DESC1](/reference/graphics/d3d12/structs/d3d12_depth_stencil_desc1_public.md)
- [D3D12_GRAPHICS_STATES](/reference/graphics/d3d12/enums/d3d12_graphics_states_public.md)
- [OMSetRenderTargets](/reference/graphics/d3d12/interfaces/id3d12graphicscommandlist/methods/id3d12graphicscommandlist_omsetrendertargets_public.md)
- [D3D12_FEATURE_DATA_D3D12_OPTIONS2](/reference/graphics/d3d12/structs/d3d12_feature_data_d3d12_options2_public.md)
- [ILampArray::GetBoundingBox method](/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getboundingbox.md)
