Passes now accept as input and provide as output Objects with FBOs as values. This allows passes to work with more than one input texture.

This commit is contained in:
Rezmason
2020-06-25 02:23:59 -07:00
parent e100117d8b
commit 021ade45e1
9 changed files with 61 additions and 40 deletions

View File

@@ -51,13 +51,13 @@ document.body.onload = async () => {
effect === "none" ? null : makeBloomPass,
effects[effect]
],
p => p.output,
p => p.outputs,
regl,
config
);
const drawToScreen = regl({
uniforms: {
tex: pipeline[pipeline.length - 1].output
tex: pipeline[pipeline.length - 1].outputs.primary
}
});
await Promise.all(pipeline.map(({ ready }) => ready));