# SetObjectDepthRange

## Description

Sets the range of depth values that this object is mapped to. By default this is 0 to 1 where 0 is the near plane and 1 is the far plane. For example setting a depth range of 1,1 will make every pixel in this object have a depth value of 1 when comparing and writing to the depth buffer. Values will be clamped to the range 0 to 1, objects outside the near or far planes will still be clipped. Reverse mappings are allowed by setting near greater than far.

## Definition

SetObjectDepthRange( objID, zNear, zFar )

void agk::SetObjectDepthRange( UINT objID, float zNear, float zFar )

## Parameters

- objID - The ID of the object to modify.
- near - The start of the depth range for this object
- far - The end of the depth range for this object