Types
65 names
The scalar, vector, matrix and memory types a declaration names.
The signature and the sentence under each name are the compiler's own text at commit 26de7be8.
f32- 32-bit floating-point value.
f64- 64-bit floating-point value, emulated in software on both GPU targets.
i32- 32-bit signed integer value.
u32- 32-bit unsigned integer value.
bool- Boolean value.
workgroup- A module variable one workgroup shares,
let tile: workgroup<array<f32, 64>>: zero at the start of each workgroup, read and written by every invocation of the workgroup, and a compute entry's alone. atomic- An
atomic<u32>oratomic<i32>: an integer location in a read-write storage binding that many invocations update at once throughatomicAdd,atomicLoadand the other atomic builtins. vec2- A two-component vector of
f32. vec3- A three-component vector of
f32. vec4- A four-component vector of
f32. vec2f- A two-component vector of
f32, same type asvec2. vec3f- A three-component vector of
f32, same type asvec3. vec4f- A four-component vector of
f32, same type asvec4. vec2i- A two-component vector of
i32. vec3i- A three-component vector of
i32. vec4i- A four-component vector of
i32. vec2u- A two-component vector of
u32. vec3u- A three-component vector of
u32. vec4u- A four-component vector of
u32. vec2b- A two-component vector of
bool: what comparing twovec2values yields, componentwise. vec3b- A three-component vector of
bool: what comparing twovec3values yields, componentwise. vec4b- A four-component vector of
bool: what comparing twovec4values yields, componentwise. vec2d- A two-component vector of
f64, same type asvec2f64. vec3d- A three-component vector of
f64, same type asvec3f64. vec4d- A four-component vector of
f64, same type asvec4f64. vec2f64- A two-component vector of
f64. vec3f64- A three-component vector of
f64. vec4f64- A four-component vector of
f64. mat2x2- 2x2 matrix of
f32(orf64asmat2x2<f64>), column-major. mat2- 2x2 matrix of
f32, column-major, same type asmat2x2. mat2x3- 2x3 matrix of
f32, column-major: 2 columns ofvec3. mat2x4- 2x4 matrix of
f32, column-major: 2 columns ofvec4. mat3x2- 3x2 matrix of
f32, column-major: 3 columns ofvec2. mat3x3- 3x3 matrix of
f32(orf64asmat3x3<f64>), column-major. mat3- 3x3 matrix of
f32, column-major, same type asmat3x3. mat3x4- 3x4 matrix of
f32, column-major: 3 columns ofvec4. mat4x2- 4x2 matrix of
f32, column-major: 4 columns ofvec2. mat4x3- 4x3 matrix of
f32, column-major: 4 columns ofvec3. mat4x4- 4x4 matrix of
f32(orf64asmat4x4<f64>), column-major. mat4- 4x4 matrix of
f32, column-major, same type asmat4x4. mat2x2f- 2x2 matrix of
f32, column-major, same type asmat2x2: WGSL's predeclared alias. mat2x3f- 2x3 matrix of
f32, column-major, same type asmat2x3: WGSL's predeclared alias. mat2x4f- 2x4 matrix of
f32, column-major, same type asmat2x4: WGSL's predeclared alias. mat3x2f- 3x2 matrix of
f32, column-major, same type asmat3x2: WGSL's predeclared alias. mat3x3f- 3x3 matrix of
f32, column-major, same type asmat3x3: WGSL's predeclared alias. mat3x4f- 3x4 matrix of
f32, column-major, same type asmat3x4: WGSL's predeclared alias. mat4x2f- 4x2 matrix of
f32, column-major, same type asmat4x2: WGSL's predeclared alias. mat4x3f- 4x3 matrix of
f32, column-major, same type asmat4x3: WGSL's predeclared alias. mat4x4f- 4x4 matrix of
f32, column-major, same type asmat4x4: WGSL's predeclared alias. sampler- A sampler: how a sampled texture is filtered and addressed when
textureSamplereads it. sampler_comparison- A comparison sampler: compares a reference depth against a depth texture in
textureSampleCompare, the read a shadow map takes. texture_2d- A sampled 2D texture of
f32,i32oru32texels, read withtextureLoad, or filtered withtextureSamplewhen its texels aref32. texture_2d_array- An array of sampled 2D textures in one binding, picked by an integer layer after the coordinate.
texture_cube- A sampled cube texture, looked up by a
vec3direction, as an environment map is. texture_3d- A sampled 3D texture, looked up by a
vec3coordinate, as a volume is. texture_1d- A sampled 1D texture, looked up by one
f32coordinate, as a colour ramp is. texture_cube_array- An array of sampled cube textures in one binding, looked up by a direction and a layer.
texture_multisampled_2d- A multisampled 2D texture, read one sample at a time with
textureLoad(t, coords, sampleIndex)and never filtered. texture_depth_2d- A 2D depth texture, single-channel float, read with
textureSampleComparethrough asampler_comparisonor withtextureLoad. texture_depth_2d_array- An array of 2D depth textures in one binding, picked by an integer layer, as shadow cascades are.
texture_depth_cube- A cube depth texture, looked up by a
vec3direction, the shadow map of a point light. texture_depth_cube_array- An array of cube depth textures in one binding, looked up by a direction and a layer.
texture_depth_multisampled_2d- The depth attachment of a multisampled target, read one sample at a time with
textureLoad. texture_storage_2d- A 2D storage texture, read and written by texel coordinate with
textureLoadandtextureStore, with no sampler. texture_storage_2d_array- An array of 2D storage textures in one binding, read and written by texel coordinate and an integer layer.
Every entry on these pages is read from the compiler at the pinned commit, and none of it is typed here.