diff --git a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Weather/Weather.cpp b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Weather/Weather.cpp index 12afc9727..a835fd673 100644 --- a/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Weather/Weather.cpp +++ b/Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Weather/Weather.cpp @@ -83,6 +83,16 @@ void AWeather::NotifyWeather(ASensor* Sensor) Sensors.Add(AsSceneCaptureCamera); #endif + if (Weather.Precipitation > 0.0f) + ActiveBlendables.Add(MakeTuple(PrecipitationPostProcessMaterial, Weather.Precipitation / 100.0f)); + else + ActiveBlendables.Remove(PrecipitationPostProcessMaterial); + + if (Weather.DustStorm > 0.0f) + ActiveBlendables.Add(MakeTuple(DustStormPostProcessMaterial, Weather.DustStorm / 100.0f)); + else + ActiveBlendables.Remove(DustStormPostProcessMaterial); + // Call the blueprint that actually changes the weather. RefreshWeather(Weather); }