# BindStorageTextureFormat

Class · extends [`BindBaseFormat`](https://api.playcanvas.com/engine/classes/BindBaseFormat.md) · category: Graphics

Source: https://github.com/playcanvas/engine/blob/970d89f6d3bc6667f4e1f88153abd6e7e82ed52c/src/platform/graphics/bind-group-format.js#L243

A class to describe the format of the storage texture for [BindGroupFormat](https://api.playcanvas.com/engine/classes/BindGroupFormat.md). Storage
texture is a texture created with the storage flag set to true, which allows it to be used as an
output of a compute shader.

Note: At the current time, storage textures are only supported in compute shaders in a
write-only mode.

## Constructors

### constructor

```ts
new BindStorageTextureFormat(name: string, format?: number, textureDimension?: string, write?: boolean, read?: boolean)
```

Create a new instance.

**Parameters**

- `name` (`string`): The name of the storage buffer.
- `format` (`number`, optional, default `PIXELFORMAT_RGBA8`): The pixel format of the texture. Note that not all formats can be
  used. Defaults to [PIXELFORMAT_RGBA8](https://api.playcanvas.com/engine/variables/PIXELFORMAT_RGBA8.md).
- `textureDimension` (`string`, optional, default `TEXTUREDIMENSION_2D`): The dimension of the texture. Defaults to
  [TEXTUREDIMENSION_2D](https://api.playcanvas.com/engine/variables/TEXTUREDIMENSION_2D.md). Can be:

  - [TEXTUREDIMENSION_1D](https://api.playcanvas.com/engine/variables/TEXTUREDIMENSION_1D.md)
  - [TEXTUREDIMENSION_2D](https://api.playcanvas.com/engine/variables/TEXTUREDIMENSION_2D.md)
  - [TEXTUREDIMENSION_2D_ARRAY](https://api.playcanvas.com/engine/variables/TEXTUREDIMENSION_2D_ARRAY.md)
  - [TEXTUREDIMENSION_3D](https://api.playcanvas.com/engine/variables/TEXTUREDIMENSION_3D.md)
- `write` (`boolean`, optional, default `true`): Whether the storage texture is writable. Defaults to true.
- `read` (`boolean`, optional, default `false`): Whether the storage texture is readable. Defaults to false. Note
  that storage texture reads are only supported if
  [GraphicsDevice#supportsStorageTextureRead](https://api.playcanvas.com/engine/classes/GraphicsDevice.md#supportsstoragetextureread) is true. Also note that only a subset of
  pixel formats can be used for storage texture reads - as an example, PIXELFORMAT_RGBA8 is not
  compatible, but PIXELFORMAT_R32U is.

## Inherited from [BindBaseFormat](https://api.playcanvas.com/engine/classes/BindBaseFormat.md)

- `name: string`
