Skip to content

CF_ShaderWgslBindingKind

Category: graphics
GitHub: cute_shader_bytecode.h


What one group/binding pair of a shader's WGSL source holds, for the WebGPU backend.

Values

Enum Description
CF_SHADER_WGSL_BINDING_KIND_SAMPLED_TEXTURE A sampled texture: texture_2d<f32>, texture_cube<f32>, texture_depth_2d and so on.
CF_SHADER_WGSL_BINDING_KIND_SAMPLER The sampler paired with a sampled texture: sampler or sampler_comparison.
CF_SHADER_WGSL_BINDING_KIND_STORAGE_TEXTURE A storage texture: texture_storage_2d<format, access>.
CF_SHADER_WGSL_BINDING_KIND_STORAGE_BUFFER A storage buffer: var<storage, read> or var<storage, read_write>.
CF_SHADER_WGSL_BINDING_KIND_UNIFORM_BUFFER A uniform block: var<uniform>, laid out to match its std140 bytes.
CF_SHADER_WGSL_BINDING_KIND_SPLIT_LOAD_TEXTURE The texture_2d load side of a split storage image, see CF_ShaderWgslSplit.

Remarks

CF descriptor set N is WGSL group N. Inside a resource group, sampled texture i (in binding order) is binding 2i and its sampler binding 2i+1; storage textures follow, then storage buffers, then the load sides of split storage images (see CF_ShaderWgslSplit). Inside a uniform group, block slot u is binding u.

CF_ShaderWgslBinding
CF_ShaderWgslSplit
CF_ShaderInfo