---
title: "StorageTextureFormat: type in Types, TypeShade API reference"
description: "StorageTextureFormat, a type in Types. The texel formats a storage texture may carry…"
url: https://typeshade.dev/api/storagetextureformat/
language: en
---

# `StorageTextureFormat`

Type in Types

The texel formats a storage texture may carry, which is WebGPU's set of formats every device supports with STORAGE\_BINDING and no optional feature.

`import type { StorageTextureFormat } from 'typeshade'`
`import type { StorageTextureFormat } from 'typeshade/core/ir'`

The signature, the description and the examples come from the compiler's own source at commit af54ddad5.

## Syntax

```ts
type StorageTextureFormat =
  | 'rgba8unorm'
  | 'rgba8snorm'
  | 'rgba8uint'
  | 'rgba8sint'
  | 'rgba16uint'
  | 'rgba16sint'
  | 'rgba16float'
  | 'r32uint'
  | 'r32sint'
  | 'r32float'
  | 'rg32uint'
  | 'rg32sint'
  | 'rg32float'
  | 'rgba32uint'
  | 'rgba32sint'
  | 'rgba32float'
  | 'bgra8unorm';
```

## Description

Measured rather than read off a spec: a real device was asked to build a bind group layout for each format at each access mode, and these sixteen are the ones a device with nothing requested took. The tiered texture-format formats (`r8unorm`, `rg8unorm`, `rgb10a2unorm`, `rg16float` and their siblings) are not here: a module naming one compiles on Tint and then fails at `createBindGroupLayout`, which is a wrong program emitted without a diagnostic.

`bgra8unorm` Is here, as the seventeenth and the only one that is not core. It is measured too, on two independent Chromium builds: a device with no feature requested refuses it (“Texture format TextureFormat::BGRA8Unorm does not support storage texture access StorageTextureAccess::WriteOnly”), a device that requested `bgra8unorm-storage` takes it at `write`, and both refuse it at `read` and `read_write`. Tint accepts every one of those spellings, so the compile gate cannot see the difference and a capability is what carries it: a module using the format needs `bgra8unormStorage`, which `reflect().requiredFeatures` hands the host as the feature to request. [`WRITE_ONLY_STORAGE_FORMATS`](https://typeshade.dev/api/writeonlystorageformats/) is the access half of the same measurement.

## See also

- [`WRITE_ONLY_STORAGE_FORMATS`](https://typeshade.dev/api/writeonlystorageformats/)

## Source

[`src/core/ir/types/storage-texture.ts`, line 34](https://github.com/typeshade/typeshade/blob/af54ddad5/src/core/ir/types/storage-texture.ts#L34), at commit af54ddad5
