mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Reduce entity fade-in time
This commit is contained in:
parent
f5d77104c3
commit
6ba6c6ee35
1 changed files with 1 additions and 1 deletions
|
@ -69,7 +69,7 @@ float Interpolate::simpleNonLinearBlend(float fraction) {
|
|||
}
|
||||
|
||||
float Interpolate::calculateFadeRatio(quint64 start) {
|
||||
const float FADE_TIME = 1.0f;
|
||||
const float FADE_TIME = 0.5f;
|
||||
float t = 2.0f * std::min(((float)(usecTimestampNow() - start)) / ((float)(FADE_TIME * USECS_PER_SECOND)), 1.0f);
|
||||
float fadeRatio = (t < 1.0f) ? 0.5f * powf(2.0f, 10.0f * (t - 1.0f)) : 0.5f * (-powf(2.0f, -10.0f * (t - 1.0f)) + 2.0f);
|
||||
|
||||
|
|
Loading…
Reference in a new issue