diff --git a/index.html b/index.html index b60ba71..8abfccb 100644 --- a/index.html +++ b/index.html @@ -30,9 +30,10 @@ glyphSequenceLength: 27, palette: [ {color: new THREE.Vector3(0.00, 0.00, 0.00), at: 0.0}, - {color: new THREE.Vector3(0.52, 0.00, 0.00), at: 0.4}, - {color: new THREE.Vector3(0.82, 0.05, 0.05), at: 0.8}, - {color: new THREE.Vector3(1.00, 0.40, 0.30), at: 1.0}, + {color: new THREE.Vector3(0.52, 0.00, 0.00), at: 0.2}, + {color: new THREE.Vector3(0.82, 0.05, 0.05), at: 0.4}, + {color: new THREE.Vector3(1.00, 0.60, 0.30), at: 0.8}, + {color: new THREE.Vector3(1.00, 1.00, 0.90), at: 1.0}, ], fallSpeed: 0.4, cycleSpeed: 0.5, diff --git a/js/MatrixRenderer.js b/js/MatrixRenderer.js index c4985d3..ade4b19 100644 --- a/js/MatrixRenderer.js +++ b/js/MatrixRenderer.js @@ -63,7 +63,7 @@ const glyphVariable = gpuCompute.addVariable( float newBrightness = 3.0 * log(value * 1.25); #ifdef hasThunder - float thunder = 10.0 * (pow(sin(SQRT_5 * simTime), 1000.0) + pow(sin(SQRT_2 * simTime), 1000.0)) + 0.5; + float thunder = 10.0 * (pow(pow(sin(SQRT_5 * simTime), 10.0), 10.0) + pow(pow(sin(SQRT_2 * simTime), 10.0), 10.0)) + 0.6; newBrightness *= thunder; @@ -72,6 +72,7 @@ const glyphVariable = gpuCompute.addVariable( } else { brightness = mix(brightness, newBrightness, brightnessChangeBias * 0.1); } + brightness = min(1.0, brightness); #else brightness = mix(brightness, newBrightness, brightnessChangeBias); #endif