Skip to content

GPUVertexAttribute

Describes one vertex attribute's format and byte offset in a vertex buffer.

Properties

format

abstract val format: GPUVertexFormat
The GPUVertexFormat of the attribute. See [GPUVertexAttribute.format in the WebGPU specification](https://www.w3.org/TR/webgpu/#dom-gpuvertexattribute-format).

offset

abstract val offset: GPUSize64
The offset, in bytes, from the beginning of the element to the data for the attribute.

shaderLocation

abstract val shaderLocation: GPUIndex32
The numeric location associated with this attribute, which will correspond with a "@location" attribute declared in the vertex.module.