Attributes
9 names
The decorators that mark an entry point and bind a field to the pipeline.
The signature and the sentence under each name are the compiler's own text at commit 26de7be8.
@vertex- Marks a top-level exported function as the pipeline's vertex-stage entry point.
@fragment- Marks a top-level exported function as the pipeline's fragment-stage entry point.
@compute- Marks a top-level exported function as a compute-stage entry point, with an optional workgroup size:
@compute([64]). @builtin- Binds a field or parameter to a WebGPU builtin value, such as
@builtin("vertex_index"). @location- Binds a field to a numeric shader IO location, such as
@location(0). @interpolate- How a
@locationvarying is interpolated:@interpolate("flat"), or a type and a sampling as in@interpolate("linear", "centroid"). @invariant- On
@builtin("position"): WGSL's promise that this position is computed the same way in two pipelines, so a depth pre-pass matches the shading pass. @blend_src- Which of the two colours a dual-source blend mixes this fragment output is:
@blend_src(0)and@blend_src(1), both at@location(0). @diagnostic- Sets the severity of a WGSL diagnostic rule for the whole module, as in
@diagnostic("off", "derivative_uniformity")on an entry.
Every entry on these pages is read from the compiler at the pinned commit, and none of it is typed here.