mirror of
https://github.com/Rezmason/matrix.git
synced 2026-04-14 12:29:30 -07:00
Fixing the shader on mobile devices(?)
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user