mirror of
https://github.com/Rezmason/matrix.git
synced 2026-04-14 12:29:30 -07:00
The webgpu project's multi-pass pipeline is borrowed from the regl project, but the outputs don't exist yet. Outputs will be tricky, because RTTs are thrown out and recreated when the canvas resizes, which I think means all the bind groups referencing the old texture have to be destroyed and recreated, too.
This commit is contained in:
@@ -61,4 +61,7 @@ const makePass = (outputs, ready, setSize, execute) => {
|
||||
};
|
||||
};
|
||||
|
||||
export { getCanvasSize, loadTexture, loadShaderModule, makeUniformBuffer, makePass };
|
||||
const makePipeline = (steps, getInputs, context) =>
|
||||
steps.filter((f) => f != null).reduce((pipeline, f, i) => [...pipeline, f(context, i == 0 ? null : getInputs(pipeline[i - 1]))], []);
|
||||
|
||||
export { getCanvasSize, loadTexture, loadShaderModule, makeUniformBuffer, makePass, makePipeline };
|
||||
|
||||
Reference in New Issue
Block a user