Add resizing

This commit is contained in:
Andras Schmelczer 2023-05-01 18:12:25 +01:00
commit 058d6014b7
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
18 changed files with 254 additions and 138 deletions

View file

@ -8,7 +8,7 @@ export const setUpFullScreenQuad = (
vertex: GPUVertexState;
} => {
const buffer = device.createBuffer({
size: 4 * 4 * 4, // 4x vec4<f32>
size: 4 * 4 * Float32Array.BYTES_PER_ELEMENT, // 4 x vec4<f32>
usage: GPUBufferUsage.VERTEX,
mappedAtCreation: true,
});
@ -30,7 +30,7 @@ export const setUpFullScreenQuad = (
entryPoint: 'vertex',
buffers: [
{
arrayStride: 4 * 4,
arrayStride: 4 * Float32Array.BYTES_PER_ELEMENT,
stepMode: 'vertex',
attributes: [
{