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"