Created a pass-through post processing compute pass. The other post-processing passes will be changed over to this kind of thing.

makePassFBO has now been split into makeRenderTarget and makeComputeTarget.
This commit is contained in:
Rezmason
2021-11-11 09:18:32 -08:00
parent 9c861fd50b
commit 9ad655ca2e
11 changed files with 158 additions and 32 deletions

View File

@@ -7,6 +7,7 @@ import makePalettePass from "./palettePass.js";
import makeStripePass from "./stripePass.js";
import makeImagePass from "./imagePass.js";
import makeResurrectionPass from "./resurrectionPass.js";
import makePostProcessingPass from "./postProcessingPass.js";
import makeEndPass from "./endPass.js";
const effects = {
@@ -52,7 +53,7 @@ export default async (canvas, config) => {
};
const effectName = config.effect in effects ? config.effect : "plain";
const pipeline = makePipeline(context, [makeRain, makeBloomPass, effects[effectName], makeEndPass]);
const pipeline = makePipeline(context, [makeRain, makeBloomPass, effects[effectName], makePostProcessingPass, makeEndPass]);
await Promise.all(pipeline.map((step) => step.ready));