decode_vertex_buffer
Decode captured vertex buffer data into per-attribute values like UV coordinates, automatically using the draw's pipeline layout from a setVertexBuffer command index.
Instructions
Decode the first N vertices of a captured vertex buffer into per-attribute numbers, so you can read e.g. 'attribute @location(2) (uv) = (0,0)' directly. Pass the bufferDataCommandIndex from get_draw_state (a setVertexBuffer command); the vertex layout is taken from the draw's pipeline automatically (or pass layout/pipelineId).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| firstN | No | Number of vertices to decode (default 8). | |
| layout | No | Optional explicit GPUVertexBufferLayout { arrayStride, attributes:[{shaderLocation, format, offset}] }. | |
| captureId | No | Capture id (default: most recent). | |
| baseVertex | No | First vertex to decode from (default 0). | |
| pipelineId | No | Optional: pipeline object id to derive the layout from. | |
| commandIndex | Yes | Index of the setVertexBuffer command (vertexBuffers[].bufferDataCommandIndex from get_draw_state). |