Add resizing
This commit is contained in:
parent
9c7b91000f
commit
058d6014b7
18 changed files with 254 additions and 138 deletions
|
|
@ -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: [
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue