mirror of
https://github.com/Rezmason/matrix.git
synced 2026-04-14 12:29:30 -07:00
A little bit of shader variable renaming and const declaration during a walkthrough of the existing code on-stream
This commit is contained in:
@@ -32,6 +32,8 @@ const loadTexture = async (device, url) => {
|
||||
export default async (canvas, config) => {
|
||||
console.log(config);
|
||||
|
||||
const NUM_VERTICES_PER_QUAD = 6;
|
||||
|
||||
const numColumns = config.numColumns;
|
||||
const numRows = config.numColumns;
|
||||
|
||||
@@ -183,7 +185,7 @@ export default async (canvas, config) => {
|
||||
bundleEncoder.setBindGroup(index, bindGroup);
|
||||
});
|
||||
const numQuads = numColumns * numRows;
|
||||
bundleEncoder.draw(6 * numQuads, 1, 0, 0);
|
||||
bundleEncoder.draw(NUM_VERTICES_PER_QUAD * numQuads, 1, 0, 0);
|
||||
const renderBundles = [bundleEncoder.finish()];
|
||||
|
||||
let frame = 0;
|
||||
|
||||
Reference in New Issue
Block a user