Unifying the interfaces of regl and webgpu makePass and makePipeline.

This commit is contained in:
Rezmason
2021-11-09 09:17:01 -08:00
parent 6586badf42
commit 87c2093281
14 changed files with 55 additions and 68 deletions

View File

@@ -28,7 +28,7 @@ const prideStripeColors = [
[0.8, 0, 1],
].flat();
export default (regl, config, inputs) => {
export default ({ regl, config }, inputs) => {
const output = makePassFBO(regl, config.useHalfFloat);
const { backgroundColor } = config;
@@ -61,8 +61,8 @@ export default (regl, config, inputs) => {
{
primary: output,
},
() => render({ frag: stripePassFrag.text() }),
null,
stripePassFrag.loaded
stripePassFrag.loaded,
(w, h) => output.resize(w, h),
() => render({ frag: stripePassFrag.text() })
);
};