From d78a1cc1b8b168ed2ab92d57082dfc3a5009bfd8 Mon Sep 17 00:00:00 2001 From: Rezmason Date: Mon, 18 Feb 2019 22:00:50 -0800 Subject: [PATCH] Fixing flicker issue in paradise matrix. --- js/MatrixRenderer.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/MatrixRenderer.js b/js/MatrixRenderer.js index 09f9f70..40cef54 100644 --- a/js/MatrixRenderer.js +++ b/js/MatrixRenderer.js @@ -131,8 +131,7 @@ const glyphVariable = gpuCompute.addVariable( ); gpuCompute.setVariableDependencies( glyphVariable, [ glyphVariable ] ); - // const brightnessChangeBias = (animationSpeed * fallSpeed) == 0 ? 1 : Math.min(1, Math.abs(animationSpeed * fallSpeed)); - const brightnessChangeBias = 1; + const brightnessChangeBias = fade ? (animationSpeed * fallSpeed) == 0 ? 1 : Math.min(1, Math.abs(animationSpeed * fallSpeed)) : 1; Object.assign(glyphVariable.material.uniforms, { time: { type: "f", value: 0 }, deltaTime: { type: "f", value: 0.01 },