Driving more uniforms.read calls from the actual shaders.

This commit is contained in:
Rezmason
2021-11-08 03:01:46 -08:00
parent 61a3a6d783
commit 415ffa77ee
8 changed files with 31 additions and 27 deletions

View File

@@ -46,10 +46,8 @@ export default (context, getInputs) => {
// rather than a single quad for our geometry
const numQuads = config.volumetric ? numCells : 1;
// TODO: uniforms should be updated to provide this too
const cellsBuffer = device.createBuffer({
size: numCells * 4 * Float32Array.BYTES_PER_ELEMENT,
size: numCells * uniforms.byteSizeOf("vec4<f32>"),
usage: GPUBufferUsage.STORAGE,
});