<!--
{
  "availability" : [
    "macOS: 26.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CompositorServices",
  "identifier" : "/documentation/CompositorServices/LayerRenderer/Drawable/depthRange",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Compositor Services",
      "CompositorServices"
    ],
    "preciseIdentifier" : "c:@F@cp_drawable_get_depth_range"
  },
  "title" : "depthRange"
}
-->

# depthRange

The distances to the far and near clipping planes from the person viewing the content, in meters.

```
var depthRange: simd_float2 { get nonmutating set }
```

## Discussion

Apply the depth range for drawing to the drawable that it applies to.
The compositor uses these values to compute the perspective projection matrix,
which clips content that’s not between the near and far planes.

Compositor Services stores the values in reverse-z order in a 2D floating-point vector:

- The `x` property stores the distance of the far plane.
- The `y` property stores the distance of the near plane.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)