The delimiter between WGSL struct fields is now a comma, which is also the delimiter between parameters in angle brackets, so gpu-buffer needs to be a little cleverer with the lines it separates.

This commit is contained in:
Rezmason
2022-04-30 18:00:35 -07:00
parent e8458a1304
commit e39c26a95a
10 changed files with 99 additions and 81 deletions

View File

@@ -50,7 +50,7 @@ export default async (canvas, config) => {
GPUTextureUsage.RENDER_ATTACHMENT | GPUTextureUsage.COPY_DST,
};
const timeUniforms = structs.from(`struct Time { seconds : f32; frames : i32; };`).Time;
const timeUniforms = structs.from(`struct Time { seconds : f32, frames : i32, };`).Time;
const timeBuffer = makeUniformBuffer(device, timeUniforms);
const context = {