Adding some more comments. Destructuring the context object in the pass modules. A little code cleanup in bloomPass. Changing the endPass sampler to be cheaper.

This commit is contained in:
Rezmason
2021-11-15 01:05:05 -08:00
parent 1b61e304a5
commit b26155d20e
10 changed files with 38 additions and 40 deletions

View File

@@ -37,9 +37,7 @@ const numVerticesPerQuad = 2 * 3;
// won't persist across subsequent frames. This is a safe trick
// in screen space.
export default (context, getInputs) => {
const { config, device, timeBuffer } = context;
export default ({ config, device, timeBuffer }) => {
// Expand and convert stripe colors into 1D texture data
const input =
"stripeColors" in config ? config.stripeColors.split(",").map(parseFloat) : config.effect === "pride" ? prideStripeColors : transPrideStripeColors;