mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 19:19:56 +00:00
Merged pull request #1936
This commit is contained in:
commit
3dc15d39e3
3 changed files with 11 additions and 7 deletions
|
@ -96,6 +96,7 @@
|
|||
Bug #4503: Cast and ExplodeSpell commands increase alteration skill
|
||||
Bug #4510: Division by zero in MWMechanics::CreatureStats::setAttribute
|
||||
Bug #4519: Knockdown does not discard movement in the 1st-person mode
|
||||
Bug #4527: Sun renders on water shader in some situations where it shouldn't
|
||||
Bug #4531: Movement does not reset idle animations
|
||||
Bug #4532: Underwater sfx isn't tied to 3rd person camera
|
||||
Bug #4539: Paper Doll is affected by GUI scaling
|
||||
|
|
|
@ -751,13 +751,16 @@ void WeatherManager::update(float duration, bool paused, const TimeStamp& time,
|
|||
|
||||
float underwaterFog = mUnderwaterFog.getValue(time.getHour(), mTimeSettings, "Fog");
|
||||
|
||||
float peakHour = mSunriseTime + (mSunsetTime - mSunriseTime) / 2;
|
||||
if (time.getHour() < mSunriseTime || time.getHour() > mSunsetTime)
|
||||
mRendering.getSkyManager()->setGlareTimeOfDayFade(0);
|
||||
float peakHour = mSunriseTime + (mTimeSettings.mNightStart - mSunriseTime) / 2;
|
||||
float glareFade = 1.f;
|
||||
if (time.getHour() < mSunriseTime || time.getHour() > mTimeSettings.mNightStart)
|
||||
glareFade = 0.f;
|
||||
else if (time.getHour() < peakHour)
|
||||
mRendering.getSkyManager()->setGlareTimeOfDayFade(1 - (peakHour - time.getHour()) / (peakHour - mSunriseTime));
|
||||
glareFade = 1.f - (peakHour - time.getHour()) / (peakHour - mSunriseTime);
|
||||
else
|
||||
mRendering.getSkyManager()->setGlareTimeOfDayFade(1 - (time.getHour() - peakHour) / (mSunsetTime - peakHour));
|
||||
glareFade = 1.f - (time.getHour() - peakHour) / (mTimeSettings.mNightStart - peakHour);
|
||||
|
||||
mRendering.getSkyManager()->setGlareTimeOfDayFade(glareFade);
|
||||
|
||||
mRendering.getSkyManager()->setMasserState(mMasser.calculateState(time));
|
||||
mRendering.getSkyManager()->setSecundaState(mSecunda.calculateState(time));
|
||||
|
@ -765,7 +768,7 @@ void WeatherManager::update(float duration, bool paused, const TimeStamp& time,
|
|||
mRendering.configureFog(mResult.mFogDepth, underwaterFog, mResult.mDLFogFactor,
|
||||
mResult.mDLFogOffset/100.0f, mResult.mFogColor);
|
||||
mRendering.setAmbientColour(mResult.mAmbientColor);
|
||||
mRendering.setSunColour(mResult.mSunColor, mResult.mSunColor * mResult.mGlareView);
|
||||
mRendering.setSunColour(mResult.mSunColor, mResult.mSunColor * mResult.mGlareView * glareFade);
|
||||
|
||||
mRendering.getSkyManager()->setWeather(mResult);
|
||||
|
||||
|
|
|
@ -286,6 +286,6 @@ void main(void)
|
|||
#if REFRACTION
|
||||
gl_FragData[0].w = 1.0;
|
||||
#else
|
||||
gl_FragData[0].w = clamp(fresnel*6.0 + specular, 0.0, 1.0); //clamp(fresnel*2.0 + specular, 0.0, 1.0);
|
||||
gl_FragData[0].w = clamp(fresnel*6.0 + specular * gl_LightSource[0].specular.w, 0.0, 1.0); //clamp(fresnel*2.0 + specular * gl_LightSource[0].specular.w, 0.0, 1.0);
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue