mirror of
https://github.com/Rezmason/matrix.git
synced 2026-04-17 05:49:30 -07:00
Implemented makePass(). Moved rain compute and render stuff into a pass.
This commit is contained in:
@@ -46,4 +46,19 @@ const makeUniformBuffer = (device, structLayout, values = null) => {
|
||||
return buffer;
|
||||
};
|
||||
|
||||
export { getCanvasSize, loadTexture, loadShaderModule, makeUniformBuffer };
|
||||
const makePass = (outputs, ready, setSize, execute) => {
|
||||
if (ready == null) {
|
||||
ready = Promise.resolve();
|
||||
} else if (ready instanceof Array) {
|
||||
ready = Promise.all(ready);
|
||||
}
|
||||
|
||||
return {
|
||||
outputs,
|
||||
ready,
|
||||
setSize,
|
||||
execute,
|
||||
};
|
||||
};
|
||||
|
||||
export { getCanvasSize, loadTexture, loadShaderModule, makeUniformBuffer, makePass };
|
||||
|
||||
Reference in New Issue
Block a user