# SceneColorMapHandle

Class · category: Graphics

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

A handle to the scene color map of a camera, obtained from
[CameraComponent#sceneColorMapHandle](https://api.playcanvas.com/engine/classes/CameraComponent.md#scenecolormaphandle). The handle is a single object for the lifetime of
the camera, and always identifies the color 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#setSceneColorMap](https://api.playcanvas.com/engine/classes/Compute.md#setscenecolormap) to make the color map available to a compute
shader.

## Accessors

### height

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

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

### width

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

Gets the width of the color 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 color map is
dispatched over this size, see [Compute#setupDispatchThreads](https://api.playcanvas.com/engine/classes/Compute.md#setupdispatchthreads). It changes with the
color map, so read it right before the dispatch: once the camera renders in the frame, it is
the width of the color map of this frame, and before that, of the previous frame.
