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

@@ -1,5 +1,5 @@
import { structs } from "/lib/gpu-buffer.js";
import { loadShader, makeUniformBuffer, makeBindGroup, makePassFBO, makePass } from "./utils.js";
import { loadShader, makeUniformBuffer, makeBindGroup, makeRenderTarget, makePass } from "./utils.js";
// Maps the brightness of the rendered rain and bloom to colors
// in a linear gradient buffer generated from the passed-in color sequence
@@ -135,7 +135,7 @@ export default (context, getInputs) => {
const setSize = (width, height) => {
output?.destroy();
output = makePassFBO(device, width, height, canvasFormat);
output = makeRenderTarget(device, width, height, canvasFormat);
};
const execute = (encoder) => {