webgpu / webgpufundamentals

https://webgpufundamentals.org
BSD 3-Clause "New" or "Revised" License
624 stars 88 forks source link

bugfix: Vertex should be replaced with a array<vec2f> #99

Closed hackaugusto closed 6 months ago

hackaugusto commented 6 months ago

Two small changes.

Wrong type on comment

@group(0) @binding(2) var<storage, read> pos: array<Vertex>;

could be replaced with:

@group(0) @binding(2) var<storage, read> pos: array<vec2f>;

instead of:

@group(0) @binding(2) var<storage, read> pos: vec2f;

Vertex was already define

The storage buffer article finishes with the shader code using the Vertex struct, the vertex buffer article started ignoring it. Changed the diff to show only the relevant changes while keeping continuity.

greggman commented 6 months ago

Sorry I missed this. Thanks!!!