Renamed gpu-uniforms to gpu-buffer, and messed around with its API.

I believe all the align, size, stride and byteOffset values are now in the proper units, ie. bytes.
This commit is contained in:
Rezmason
2021-11-08 22:56:00 -08:00
parent cf02073ff3
commit a143e3fc03
9 changed files with 59 additions and 66 deletions

View File

@@ -1,4 +1,4 @@
import uniforms from "/lib/gpu-uniforms.js";
import { structs } from "/lib/gpu-buffer.js";
import { loadShader, makeUniformBuffer, makePassFBO, makePass } from "./utils.js";
// Matrix Resurrections isn't in theaters yet,
@@ -56,7 +56,7 @@ export default (context, getInputs) => {
},
});
const configUniforms = uniforms.read(resurrectionShader.code).Config;
const configUniforms = structs.from(resurrectionShader.code).Config;
configBuffer = makeUniformBuffer(device, configUniforms, { ditherMagnitude: 0.05, backgroundColor: config.backgroundColor });
})();