From 0f7d09a35eaf85615d2acd2df370a4f230eb9890 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Mon, 12 Oct 2015 00:24:43 +0200 Subject: [PATCH] Make the fade look maybe a tad more natural. --- theme.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/theme.lua b/theme.lua index 8e433e2..b9d0b5b 100644 --- a/theme.lua +++ b/theme.lua @@ -273,6 +273,11 @@ function get_chain(num, t, width, height) tt = fade_src + tt * (fade_dst - fade_src) + -- Make the fade look maybe a tad more natural, by pumping it + -- through a sigmoid function. + tt = 10.0 * tt - 5.0 + tt = 1.0 / (1.0 + math.exp(-tt)) + fade_chain_mix_effect:set_float("strength_first", tt) fade_chain_mix_effect:set_float("strength_second", 1.0 - tt) end -- 2.39.2