Expose dither magnitude and bloom strength through URL parameters.

This commit is contained in:
Rezmason
2021-12-24 20:02:40 -08:00
parent adada69cdf
commit a962a6128d
8 changed files with 20 additions and 9 deletions

View File

@@ -10,7 +10,7 @@ import { loadText, make1DTexture, makePassFBO, makePass } from "./utils.js";
export default ({ regl, config }, inputs) => {
const output = makePassFBO(regl, config.useHalfFloat);
const { backgroundColor } = config;
const { backgroundColor, ditherMagnitude } = config;
const resurrectionPassFrag = loadText("shaders/glsl/resurrectionPass.frag.glsl");
const render = regl({
@@ -18,9 +18,9 @@ export default ({ regl, config }, inputs) => {
uniforms: {
backgroundColor,
ditherMagnitude,
tex: inputs.primary,
bloomTex: inputs.bloom,
ditherMagnitude: 0.05,
},
framebuffer: output,
});