forked from townforge/townforge
game: remove redundant function call
This commit is contained in:
parent
375d6c2efb
commit
3f1c89d7f9
@ -3016,7 +3016,6 @@ void CryptoCityUrho3D::UpdateSky()
|
||||
viewport->GetRenderPath()->SetEnabled("ProcSky", true);
|
||||
if (!manualSky_)
|
||||
{
|
||||
const float summerness = GetSummerness();
|
||||
procsky->Kr_ = {Lerp(0.86f, 0.1887f, summerness), Lerp(0.88f, 0.49784f, summerness), Lerp(0.86f, 0.661606f, summerness)};
|
||||
procsky->rayleighBrightness_ = Lerp(0.0f, 3.3f, summerness);
|
||||
procsky->scatterStrength_ = Lerp(1.0f, 0.028f, summerness);
|
||||
@ -3026,18 +3025,17 @@ void CryptoCityUrho3D::UpdateSky()
|
||||
procsky->mieCollectionPower_ = Lerp(0.434783f, 0.39f, summerness);
|
||||
procsky->mieDistribution_ = Lerp(0.652174f, 0.63f, summerness);
|
||||
|
||||
const float s = snowfall.GetStrength();
|
||||
procsky->snowfall_ = s;
|
||||
if (s > 0.0f)
|
||||
procsky->snowfall_ = snowfall_strength;
|
||||
if (snowfall_strength > 0.0f)
|
||||
{
|
||||
Vector3 snow_sky_color(0.6f * ambient.r_, 0.2f * ambient.g_, 0.0f);
|
||||
procsky->Kr_ = Lerp(procsky->Kr_, snow_sky_color, s);
|
||||
procsky->scatterStrength_ = Lerp(procsky->scatterStrength_, 0.02f, s);
|
||||
procsky->rayleighStrength_ = Lerp(procsky->rayleighStrength_, 0.05f, s);
|
||||
procsky->mieStrength_ = Lerp(procsky->mieStrength_, 0.01f, s);
|
||||
procsky->rayleighCollectionPower_ = Lerp(procsky->rayleighCollectionPower_, 0.74f, s);
|
||||
procsky->mieCollectionPower_ = Lerp(procsky->mieCollectionPower_, 0.0f, s);
|
||||
procsky->mieDistribution_ = Lerp(procsky->mieDistribution_, 0.0f, s);
|
||||
procsky->Kr_ = Lerp(procsky->Kr_, snow_sky_color, snowfall_strength);
|
||||
procsky->scatterStrength_ = Lerp(procsky->scatterStrength_, 0.02f, snowfall_strength);
|
||||
procsky->rayleighStrength_ = Lerp(procsky->rayleighStrength_, 0.05f, snowfall_strength);
|
||||
procsky->mieStrength_ = Lerp(procsky->mieStrength_, 0.01f, snowfall_strength);
|
||||
procsky->rayleighCollectionPower_ = Lerp(procsky->rayleighCollectionPower_, 0.74f, snowfall_strength);
|
||||
procsky->mieCollectionPower_ = Lerp(procsky->mieCollectionPower_, 0.0f, snowfall_strength);
|
||||
procsky->mieDistribution_ = Lerp(procsky->mieDistribution_, 0.0f, snowfall_strength);
|
||||
}
|
||||
}
|
||||
procsky->SetTimeOfDay(timeOfDay);
|
||||
|
Loading…
Reference in New Issue
Block a user