Bloom pass can now be disabled.

This commit is contained in:
Rezmason
2021-09-05 15:52:42 -07:00
parent e570af5bc8
commit cfadbe145c
2 changed files with 14 additions and 2 deletions

View File

@@ -17,6 +17,18 @@ const levelStrengths = Array(pyramidHeight)
.reverse();
export default (regl, config, inputs) => {
const enabled = config.bloomSize > 0 && config.bloomStrength > 0;
if (!enabled) {
return makePass(
{
primary: inputs.primary,
bloom: makePassFBO(regl)
}
);
}
const uniforms = extractEntries(config, [
"bloomStrength",
"highPassThreshold"

View File

@@ -19,7 +19,7 @@ const fonts = {
const defaults = {
animationSpeed: 1,
bloomStrength: 1,
bloomSize: 0.6,
bloomSize: 1,
highPassThreshold: 0.3,
cycleSpeed: 1,
cycleStyleName: "cycleFasterWhenDimmed",
@@ -148,7 +148,7 @@ const paramMapping = {
},
bloomSize: {
key: "bloomSize",
parser: s => nullNaN(range(parseFloat(s), 0.01, 1))
parser: s => nullNaN(range(parseFloat(s), 0, 1))
},
url: { key: "bgURL", parser: s => s },
colors: { key: "stripeColors", parser: s => s }