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.
This commit is contained in:
@@ -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[])
|
||||
|
||||
Reference in New Issue
Block a user