🔧 Use RGB for wisps color
This commit is contained in:
@@ -4,4 +4,4 @@
|
|||||||
|
|
||||||
effect.setUniform(this.shader, 'uDuration', this.duration * 0.001);
|
effect.setUniform(this.shader, 'uDuration', this.duration * 0.001);
|
||||||
effect.setUniform(this.shader, 'uScale', effect.readConfig('Scale', 1.0));
|
effect.setUniform(this.shader, 'uScale', effect.readConfig('Scale', 1.0));
|
||||||
effect.setUniform(this.shader, 'uColor', this.readRGBAConfig('Color'));
|
effect.setUniform(this.shader, 'uColor', this.readRGBConfig('Color'));
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
// The content from common.glsl is automatically prepended to each shader effect.
|
// The content from common.glsl is automatically prepended to each shader effect.
|
||||||
|
|
||||||
uniform vec2 uSeed;
|
uniform vec2 uSeed;
|
||||||
uniform vec4 uColor;
|
uniform vec3 uColor;
|
||||||
uniform float uScale;
|
uniform float uScale;
|
||||||
|
|
||||||
const float WISPS_RADIUS = 20.0;
|
const float WISPS_RADIUS = 20.0;
|
||||||
@@ -99,7 +99,7 @@ void main() {
|
|||||||
oColor.a *= windowMask * mask;
|
oColor.a *= windowMask * mask;
|
||||||
|
|
||||||
// Add the wisps.
|
// Add the wisps.
|
||||||
vec4 wispColor = wisps * vec4(uColor.rgb, min(wispsIn, 1.0 - wispsOut) * mask);
|
vec4 wispColor = wisps * vec4(uColor, min(wispsIn, 1.0 - wispsOut) * mask);
|
||||||
oColor = alphaOver(oColor, wispColor);
|
oColor = alphaOver(oColor, wispColor);
|
||||||
|
|
||||||
// These are pretty useful for understanding how this works.
|
// These are pretty useful for understanding how this works.
|
||||||
|
|||||||
+1
-1
@@ -58,7 +58,7 @@ var Wisps = class {
|
|||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
shader.set_uniform_float(shader._uSeed, 2, [testMode ? 0 : Math.random(), testMode ? 0 : Math.random()]);
|
shader.set_uniform_float(shader._uSeed, 2, [testMode ? 0 : Math.random(), testMode ? 0 : Math.random()]);
|
||||||
shader.set_uniform_float(shader._uColor, 4, [c.red / 255, c.green / 255, c.blue / 255, 1.0]);
|
shader.set_uniform_float(shader._uColor, 3, [c.red / 255, c.green / 255, c.blue / 255]);
|
||||||
shader.set_uniform_float(shader._uScale, 1, [settings.get_double('wisps-scale')]);
|
shader.set_uniform_float(shader._uScale, 1, [settings.get_double('wisps-scale')]);
|
||||||
// clang-format on
|
// clang-format on
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user