---
title: depthMap
framework: arkit
role: symbol
role_heading: Instance Property
path: arkit/ardepthdata/depthmap
---

# depthMap

The estimated distance from the device to its environment, in meters.

## Declaration

```swift
unowned(unsafe) var depthMap: CVPixelBuffer { get }
```

## Discussion

Discussion For custom renderers, if you create a texture to send depth data to the GPU, choose a MTLPixelFormat according to the depthMap pixel format. Call CVPixelBufferGetPixelFormatType(_:) on the depthMap to get its format. For example, if at runtime the depthMap format is kCVPixelFormatType_DepthFloat32  (OSType `fdep`), use  MTLPixelFormat.r32Float.

## See Also

### Depth Information

- [confidenceMap](arkit/ardepthdata/confidencemap.md)
- [ARConfidenceLevel](arkit/arconfidencelevel.md)
