Skip to main content

Module binding

Module binding 

Source
Expand description

Binding declarations a shader makes at @group(0), read from the WGSL at build time.

The engine reads a pass’s declarations in @binding order and resolves each name itself. A name in RESERVED is a resource the engine owns. Any other name is the BufferSpec label of one of the model’s own buffers, with an optional _in or _out suffix. The suffix is a naming convention, and the access mode picks the side the name resolves to.

Structs§

BindingDecl
One @group(0) @binding(n) declaration. Its position in a pass’s slice is n.

Enums§

BindingKind
Kind of resource a binding declares, as the engine needs it for a layout entry.

Constants§

RESERVED
Names that the engine resolves itself.

Functions§

buffer_target
Returns the buffer label that decl refers to, and whether the pass writes it.