From 0a1f79dcd6eebc4740ba2ff20fe8530f614fba24 Mon Sep 17 00:00:00 2001 From: Rezmason Date: Mon, 18 Feb 2019 21:19:07 -0800 Subject: [PATCH] The "throwback" version is looking better. --- index.html | 27 ++++++--------------------- js/MatrixRenderer.js | 4 ++-- 2 files changed, 8 insertions(+), 23 deletions(-) diff --git a/index.html b/index.html index 195e7bc..371336e 100644 --- a/index.html +++ b/index.html @@ -123,32 +123,17 @@ }, throwback: { fontTexture: "./matrixcode_msdf.png", - raindropLength: 2, + raindropLength: 1.5, glyphSequenceLength: 57, bloom: { - strength: 0.3, - radius: 1.5, + strength: 1, + radius: 0.4, threshold: 0.0 }, palette: [ - {r: ( 0 * 1.3)/255, g: ( 0 * 1.2)/255, b: ( 0 * 1.3)/255, at: 0/48}, - {r: ( 6 * 1.3)/255, g: ( 16 * 1.2)/255, b: ( 8 * 1.3)/255, at: 1/48}, - {r: ( 11 * 1.3)/255, g: ( 28 * 1.2)/255, b: ( 15 * 1.3)/255, at: 2/48}, - {r: ( 17 * 1.3)/255, g: ( 41 * 1.2)/255, b: ( 23 * 1.3)/255, at: 3/48}, - {r: ( 20 * 1.3)/255, g: ( 58 * 1.2)/255, b: ( 31 * 1.3)/255, at: 4/48}, - {r: ( 23 * 1.3)/255, g: ( 84 * 1.2)/255, b: ( 39 * 1.3)/255, at: 5/48}, - {r: ( 30 * 1.3)/255, g: (113 * 1.2)/255, b: ( 48 * 1.3)/255, at: 6/48}, - {r: ( 43 * 1.3)/255, g: (142 * 1.2)/255, b: ( 60 * 1.3)/255, at: 7/48}, - {r: ( 57 * 1.3)/255, g: (160 * 1.2)/255, b: ( 72 * 1.3)/255, at: 8/48}, - {r: ( 70 * 1.3)/255, g: (175 * 1.2)/255, b: ( 81 * 1.3)/255, at: 9/48}, - {r: ( 75 * 1.3)/255, g: (187 * 1.2)/255, b: ( 85 * 1.3)/255, at: 10/48}, - {r: ( 78 * 1.3)/255, g: (196 * 1.2)/255, b: ( 91 * 1.3)/255, at: 11/48}, - {r: ( 83 * 1.3)/255, g: (203 * 1.2)/255, b: (102 * 1.3)/255, at: 12/48}, - {r: ( 92 * 1.3)/255, g: (212 * 1.2)/255, b: (114 * 1.3)/255, at: 13/48}, - {r: (109 * 1.0)/255, g: (255 * 1.0)/255, b: (130 * 1.0)/255, at: 14/48}, - {r: (129 * 1.0)/255, g: (255 * 1.0)/255, b: (148 * 1.0)/255, at: 15/48}, - {r: (140 * 1.0)/255, g: (255 * 1.0)/255, b: (157 * 1.0)/255, at: 16/48}, - {r: (255 * 1.0)/255, g: (255 * 1.0)/255, b: (255 * 1.0)/255, at: 36/48}, + {r: 0.00, g: 0.00, b: 0.00, at: 0.0}, + {r: 0.30, g: 0.90, b: 0.35, at: 0.5}, + {r: 0.90, g: 1.00, b: 0.90, at: 1.0}, ], fallSpeed: 0.6, cycleSpeed: 0.4, diff --git a/js/MatrixRenderer.js b/js/MatrixRenderer.js index 007dc3b..faa67e2 100644 --- a/js/MatrixRenderer.js +++ b/js/MatrixRenderer.js @@ -104,7 +104,7 @@ const glyphVariable = gpuCompute.addVariable( if (brightness > 0.0) glyphCycleSpeed = pow(1.0 - brightness, 4.0); #endif #ifdef cycleRandomly - glyphCycleSpeed = 1.0; // TODO: should be similar to brightness + glyphCycleSpeed = fract((glyphTime + 0.7 * sin(SQRT_2 * glyphTime) + 1.1 * sin(SQRT_5 * glyphTime))) * 0.75; #endif glyphCycle = fract(glyphCycle + deltaTime * cycleSpeed * 0.2 * glyphCycleSpeed); float symbol = floor(glyphSequenceLength * glyphCycle); @@ -246,7 +246,7 @@ const glyphVariable = gpuCompute.addVariable( float brightness = glyph.r; #ifndef fade if (brightness < -1.0) { discard; return; } - if (brightness > 0.55) { + if (brightness > 0.65) { brightness *= 2.0; } else { brightness = 0.25;