aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDickby <[email protected]>2023-11-11 14:15:37 +0100
committerGitHub <[email protected]>2023-11-11 13:15:37 +0000
commit7345b1a1ea2671953df48c8a18524a7e556d383c (patch)
tree9f53ef28aaaaf143a3dc371da0253c3587e18d2f
parente44d6de555da72bd45ebd01c1293d53ea2700d3f (diff)
downloadHyprland-7345b1a1ea2671953df48c8a18524a7e556d383c.tar.gz
Hyprland-7345b1a1ea2671953df48c8a18524a7e556d383c.zip
shaders: Use clamp in doubleCircleSigmoid. (#3824)
-rw-r--r--src/render/shaders/Textures.hpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/render/shaders/Textures.hpp b/src/render/shaders/Textures.hpp
index e0a2b498..daa7bc9b 100644
--- a/src/render/shaders/Textures.hpp
+++ b/src/render/shaders/Textures.hpp
@@ -205,9 +205,7 @@ const float c = 0.66; // Determines the smoothness of the transition of unboost
// http://www.flong.com/archive/texts/code/shapers_circ/
float doubleCircleSigmoid(float x, float a) {
- float min_param_a = 0.0;
- float max_param_a = 1.0;
- a = max(min_param_a, min(max_param_a, a));
+ a = clamp(a, 0.0, 1.0);
float y = .0;
if (x <= a) {