Adding bloomSize customization option, which reduces the resolution of the bloom shader pass.

This commit is contained in:
Rezmason
2019-11-20 21:47:04 -08:00
parent d0646f2b7a
commit 5cea203bec
2 changed files with 4 additions and 1 deletions

View File

@@ -214,6 +214,7 @@
const glyphEdgeCrop = parseFloat(getParam("encroach", version.glyphEdgeCrop));
const glyphHeightToWidth = parseFloat(getParam("stretch", version.glyphHeightToWidth));
const cursorEffectThreshold = getParam("cursorEffectThreshold", version.cursorEffectThreshold);
const bloomSize = Math.max(0.01, Math.min(1, parseFloat(getParam("bloomSize", 0.5))));
const effect = getParam("effect", "plain");
@@ -300,7 +301,7 @@
matrixRenderer.resize(width, height);
renderer.setSize(width, height);
composer.setSize(width * pixelRatio, height * pixelRatio);
bloomPass.setSize( window.innerWidth * pixelRatio, window.innerHeight * pixelRatio );
bloomPass.setSize( window.innerWidth * pixelRatio * bloomSize, window.innerHeight * pixelRatio * bloomSize );
}
window.addEventListener("resize", windowResize, false);
window.addEventListener("orientationchange", windowResize, false);