mirror of
https://github.com/Rezmason/matrix.git
synced 2026-04-17 13:59:30 -07:00
Passing all the rain pass configs through a giant struct into the rain shader. I've included the compute shader fields, because I have hope that the compute pass can use the same shader module.
This commit is contained in:
@@ -68,7 +68,7 @@ const buildStruct = (fields, values, buffer) => {
|
||||
for (let i = 0; i < values.length; i++) {
|
||||
const view = views[fields[i].baseType];
|
||||
const value = values[i];
|
||||
const array = value[Symbol.iterator] == null ? [value] : value;
|
||||
const array = value[Symbol.iterator] == null ? [Number(value)] : value;
|
||||
view.set(array, fields[i].byteOffset);
|
||||
}
|
||||
return buffer;
|
||||
|
||||
Reference in New Issue
Block a user