mirror of
https://github.com/Rezmason/matrix.git
synced 2026-04-18 06:09:30 -07:00
Replacing "logarithmic brightness" with a simple brightness-and-contrast setup. Adjusting a bunch of configs.
This commit is contained in:
@@ -23,6 +23,7 @@ uniform float animationSpeed, fallSpeed, cycleSpeed;
|
||||
uniform bool hasSun, hasThunder, loops;
|
||||
uniform bool showComputationTexture;
|
||||
uniform float brightnessOverride, brightnessThreshold, brightnessDecay;
|
||||
uniform float baseContrast, baseBrightness;
|
||||
uniform float raindropLength, glyphHeightToWidth;
|
||||
uniform int cycleStyle, rippleType;
|
||||
uniform float rippleScale, rippleSpeed, rippleThickness;
|
||||
@@ -63,7 +64,7 @@ float getBrightness(float rainTime) {
|
||||
if (loops) {
|
||||
value = 1. - fract(rainTime);
|
||||
}
|
||||
return log(value * 1.25) * 3.;
|
||||
return value * baseContrast + baseBrightness;
|
||||
}
|
||||
|
||||
float getCycleSpeed(float rainTime, float brightness) {
|
||||
|
||||
@@ -15,6 +15,8 @@ struct Config {
|
||||
brightnessThreshold : f32,
|
||||
brightnessOverride : f32,
|
||||
brightnessDecay : f32,
|
||||
baseBrightness : f32,
|
||||
baseContrast : f32,
|
||||
cursorEffectThreshold : f32,
|
||||
cycleSpeed : f32,
|
||||
cycleFrameSkip : i32,
|
||||
@@ -140,7 +142,7 @@ fn getBrightness(rainTime : f32) -> f32 {
|
||||
if (bool(config.loops)) {
|
||||
value = 1.0 - fract(rainTime);
|
||||
}
|
||||
return log(value * 1.25) * 3.0;
|
||||
return value * config.baseContrast + config.baseBrightness;
|
||||
}
|
||||
|
||||
fn getCycleSpeed(rainTime : f32, brightness : f32) -> f32 {
|
||||
|
||||
Reference in New Issue
Block a user