From 512c4e8c95776cad3bb3b411b088f54ef364e23f Mon Sep 17 00:00:00 2001 From: Bert Peters Date: Fri, 16 Mar 2018 14:37:37 +0100 Subject: [PATCH] Tweak animation step a little. Animation now starts slightly after the start and ends slightly before the end. This prevents a weird flicker effect in the image like layers. --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 2e54067..b4d962f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -167,7 +167,7 @@ static void idleFunc() checkGLErrors(); glutPostRedisplay(); throttleIdleFunc(); - rendererData.animationStep = (1 - cos(M_PI * getAnimationStep(std::chrono::seconds(5)))) / 2; + rendererData.animationStep = 0.025f + 0.95f * (1 - cos(M_PI * getAnimationStep(std::chrono::seconds(5)))) / 2; } int main(int argc, char *argv[])