16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 03:09:18 +02:00

build 190322. support for vehicle load visualization model override, skydome brightness tweaks

This commit is contained in:
tmj-fstate
2019-03-22 15:45:20 +01:00
parent df068534d4
commit faaabf116b
4 changed files with 31 additions and 2 deletions

View File

@@ -118,6 +118,11 @@ world_environment::update() {
duskfactor );
}
// ...update skydome to match the current sun position as well...
// turbidity varies from 2-3 during the day based on overcast, 3-4 after sunset to deal with sunlight bleeding too much into the sky from below horizon
m_skydome.SetTurbidity(
2.f
+ clamp( Global.Overcast, 0.f, 1.f )
+ interpolate( 0.f, 1.f, clamp( twilightfactor * 1.5f, 0.f, 1.f ) ) );
m_skydome.SetOvercastFactor( Global.Overcast );
m_skydome.Update( m_sun.getDirection() );
// ...retrieve current sky colour and brightness...