p3nGu1nZz commited on
Commit
a2241b7
1 Parent(s): ad1e7e0

move over butter

Browse files
Files changed (2) hide show
  1. config.js +2 -1
  2. index.html +2 -3
config.js CHANGED
@@ -6,5 +6,6 @@ export const config = {
6
  glyphHeight: 40,
7
  maxGlyphs: 100,
8
  vertsPerGlyph: 6,
9
- floatsPerVertex: 8
 
10
  };
 
6
  glyphHeight: 40,
7
  maxGlyphs: 100,
8
  vertsPerGlyph: 6,
9
+ floatsPerVertex: 8,
10
+ uniformBufferSize: 64
11
  };
index.html CHANGED
@@ -170,13 +170,12 @@
170
  magFilter: 'linear'
171
  });
172
 
173
- const uniformBufferSize = 16 * 4; //f32
174
  const uniformBuffer = device.createBuffer({
175
  label: 'uniforms for quad',
176
- size: uniformBufferSize,
177
  usage: GPUBufferUsage.UNIFORM | GPUBufferUsage.COPY_DST
178
  });
179
- const uniformValues = new Float32Array(uniformBufferSize / 4);
180
  const matrix = uniformValues.subarray(0, 16);
181
 
182
  const bindGroup = device.createBindGroup({
 
170
  magFilter: 'linear'
171
  });
172
 
 
173
  const uniformBuffer = device.createBuffer({
174
  label: 'uniforms for quad',
175
+ size: config.uniformBufferSize,
176
  usage: GPUBufferUsage.UNIFORM | GPUBufferUsage.COPY_DST
177
  });
178
+ const uniformValues = new Float32Array(config.uniformBufferSize / 4);
179
  const matrix = uniformValues.subarray(0, 16);
180
 
181
  const bindGroup = device.createBindGroup({