Foggy, Blizzard & Thunderstorm weather fixes

* During weather that reduces fog distance, fog has the correct color now based on time of day and environmenttype
* During Blizzard & Thunderstorm, the clouds are now partially transparent to blend in better with the thick fog
This commit is contained in:
JappaWakka 2022-12-10 14:03:20 +01:00
parent cc4b50f059
commit 3dba6774d4
2 changed files with 14 additions and 3 deletions

View File

@ -182,7 +182,12 @@
Private Function GetCloudAlpha() As Single
If Screen.Level.World.EnvironmentType = World.EnvironmentTypes.Outside And World.IsAurora = False Then
Return 1.0F
Select Case World.GetWeatherFromWeatherType(Screen.Level.WeatherType)
Case World.Weathers.Blizzard, World.Weathers.Thunderstorm
Return 0.25F
Case Else
Return 1.0F
End Select
Else
Return 0.0F
End If

View File

@ -596,32 +596,38 @@ endsub:
Case EnvironmentTypes.Outside
Dim multiplier As Vector3 = New Vector3(1.0F)
Select Case CurrentMapWeather
Case World.Weathers.Clear, Weathers.Sunny
Case World.Weathers.Clear, Weathers.Sunny, World.Weathers.Fog
multiplier = New Vector3(1.0F)
Case World.Weathers.Rain, Weathers.Thunderstorm, World.Weathers.Fog
Case World.Weathers.Rain, Weathers.Thunderstorm
multiplier = New Vector3(0.7F)
Case World.Weathers.Snow
multiplier = New Vector3(0.8F)
End Select
Core.BackgroundColor = (Lighting.GetEnvironmentColor(2) * multiplier).ToColor
Screen.Effect.FogColor = Lighting.GetEnvironmentColor(2) * multiplier
Screen.SkyDome.TextureDown = TextureManager.GetTexture("SkyDomeResource\Stars")
Case EnvironmentTypes.Inside
Core.BackgroundColor = Lighting.GetEnvironmentColor(2).ToColor
Screen.Effect.FogColor = Lighting.GetEnvironmentColor(2)
Screen.SkyDome.TextureUp = TextureManager.GetTexture("SkyDomeResource\Inside")
Screen.SkyDome.TextureDown = Nothing
Case EnvironmentTypes.Dark
Core.BackgroundColor = Lighting.GetEnvironmentColor(2).ToColor
Screen.Effect.FogColor = Lighting.GetEnvironmentColor(2)
Screen.SkyDome.TextureUp = TextureManager.GetTexture("SkyDomeResource\Dark")
Screen.SkyDome.TextureDown = Nothing
Case EnvironmentTypes.Cave
Core.BackgroundColor = Lighting.GetEnvironmentColor(2).ToColor
Screen.Effect.FogColor = Lighting.GetEnvironmentColor(2)
Screen.SkyDome.TextureUp = TextureManager.GetTexture("SkyDomeResource\Cave")
Screen.SkyDome.TextureDown = Nothing
Case EnvironmentTypes.Underwater
Core.BackgroundColor = Lighting.GetEnvironmentColor(2).ToColor
Screen.Effect.FogColor = Lighting.GetEnvironmentColor(2)
Screen.SkyDome.TextureUp = TextureManager.GetTexture("SkyDomeResource\Underwater")
Screen.SkyDome.TextureDown = Nothing
Case EnvironmentTypes.Forest
Core.BackgroundColor = Lighting.GetEnvironmentColor(2).ToColor
Screen.Effect.FogColor = Lighting.GetEnvironmentColor(2)
Screen.SkyDome.TextureUp = TextureManager.GetTexture("SkyDomeResource\Forest")
Screen.SkyDome.TextureDown = Nothing