The multisampled_array_textures language feature adds the texture_multisampled_2d_array<T> WGSL type. The texel type T must be f32, i32, or u32.
This is an experimental language feature based on the multisampled array textures proposal.
The requires directive documents the module's dependency on the language feature. It does not enable the feature; the implementation must support it.
requires multisampled_array_textures; @group(0) @binding(0) var texture : texture_multisampled_2d_array<f32>;
The language feature adds overloads for:
textureDimensions(texture)textureNumLayers(texture)textureNumSamples(texture)textureLoad(texture, coordinates, array_index, sample_index)For example:
requires multisampled_array_textures; @group(0) @binding(0) var texture : texture_multisampled_2d_array<f32>; fn loadSample(coordinates : vec2<i32>, layer : i32, sample : i32) -> vec4<f32> { return textureLoad(texture, coordinates, layer, sample); }