texture_storage_2d
Type
A 2D storage texture, read and written by texel coordinate with textureLoad and textureStore, with no sampler.
The signature and the sentence under each name are the compiler's own text at commit 26de7be8.
Syntax
type texture_storage_2d< F extends StorageFormat, A extends StorageAccess = 'write',> = A extends 'write' ? { readonly [storageTextureTag]: readonly [F, A, false] } : F extends WriteOnlyStorageFormat ? never : A extends 'read_write' ? F extends ReadWriteStorageFormat ? { readonly [storageTextureTag]: readonly [F, A, false] } : never : { readonly [storageTextureTag]: readonly [F, A, false] }A signature may name a type the ambient file declares for its own use. These are those declarations.
StorageFormattype StorageFormat = 'rgba8unorm' | 'rgba8snorm' | 'rgba8uint' | 'rgba8sint' | 'rgba16uint' | 'rgba16sint' | 'rgba16float' | 'r32uint' | 'r32sint' | 'r32float' | 'rg32uint' | 'rg32sint' | 'rg32float' | 'rgba32uint' | 'rgba32sint' | 'rgba32float' | 'bgra8unorm'StorageAccesstype StorageAccess = 'write' | 'read' | 'read_write'ReadWriteStorageFormattype ReadWriteStorageFormat = 'r32uint' | 'r32sint' | 'r32float'WriteOnlyStorageFormattype WriteOnlyStorageFormat = 'bgra8unorm'
Parameters
-
FStorageFormat -
AoptionalStorageAccess
Description
Its format and access mode are its type arguments, as in declare const dst: texture_storage_2d<"rgba8unorm", "write">; GLSL ES 3.00 has no form for it.