mirror of
https://github.com/Rezmason/matrix.git
synced 2026-04-21 07:19:30 -07:00
Bloom pass can now be disabled.
This commit is contained in:
@@ -17,6 +17,18 @@ const levelStrengths = Array(pyramidHeight)
|
|||||||
.reverse();
|
.reverse();
|
||||||
|
|
||||||
export default (regl, config, inputs) => {
|
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, [
|
const uniforms = extractEntries(config, [
|
||||||
"bloomStrength",
|
"bloomStrength",
|
||||||
"highPassThreshold"
|
"highPassThreshold"
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ const fonts = {
|
|||||||
const defaults = {
|
const defaults = {
|
||||||
animationSpeed: 1,
|
animationSpeed: 1,
|
||||||
bloomStrength: 1,
|
bloomStrength: 1,
|
||||||
bloomSize: 0.6,
|
bloomSize: 1,
|
||||||
highPassThreshold: 0.3,
|
highPassThreshold: 0.3,
|
||||||
cycleSpeed: 1,
|
cycleSpeed: 1,
|
||||||
cycleStyleName: "cycleFasterWhenDimmed",
|
cycleStyleName: "cycleFasterWhenDimmed",
|
||||||
@@ -148,7 +148,7 @@ const paramMapping = {
|
|||||||
},
|
},
|
||||||
bloomSize: {
|
bloomSize: {
|
||||||
key: "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 },
|
url: { key: "bgURL", parser: s => s },
|
||||||
colors: { key: "stripeColors", parser: s => s }
|
colors: { key: "stripeColors", parser: s => s }
|
||||||
|
|||||||
Reference in New Issue
Block a user