# SceneDepthMapHandle

Class · category: Graphics

Source: https://github.com/playcanvas/engine/blob/64089771243fe28a9b9d2b4de538b99b07c75097/src/platform/graphics/scene-depth-map-handle.js#L20

A handle to the scene depth map of a camera, obtained from
[CameraComponent#sceneDepthMapHandle](https://api.playcanvas.com/engine/classes/CameraComponent.md#scenedepthmaphandle). The handle is a single object for the lifetime of
the camera, and always identifies the depth map the camera rendered most recently, together with
how it is encoded, even as the camera renders it to a different texture.

Pass the handle to [Compute#setSceneDepthMap](https://api.playcanvas.com/engine/classes/Compute.md#setscenedepthmap) to make the depth map available to a compute
shader.

## Accessors

### height

```ts
get height(): number
```

Gets the height of the depth map the camera rendered most recently, in texels, or 0 when the
camera has not rendered one. See [SceneDepthMapHandle#width](https://api.playcanvas.com/engine/classes/SceneDepthMapHandle.md#width).

### width

```ts
get width(): number
```

Gets the width of the depth map the camera rendered most recently, in texels, or 0 when the
camera has not rendered one. A compute shader processing each texel of the depth map is
dispatched over this size, see [Compute#setupDispatchThreads](https://api.playcanvas.com/engine/classes/Compute.md#setupdispatchthreads). It changes with the
depth map, so read it right before the dispatch: once the camera renders in the frame, it is
the width of the depth map of this frame, and before that, of the previous frame.
