Fix Low / Epic quality levels transition
This commit is contained in:
parent
b9fbbf7fd0
commit
f3022b9150
|
@ -14,6 +14,8 @@
|
|||
#include "InstancedFoliageActor.h"
|
||||
#include "Kismet/GameplayStatics.h"
|
||||
#include "Landscape.h"
|
||||
#include "Scalability.h"
|
||||
|
||||
|
||||
static constexpr float CARLA_SETTINGS_MAX_SCALE_SIZE = 50.0f;
|
||||
|
||||
|
@ -71,11 +73,15 @@ void UCarlaSettingsDelegate::ApplyQualityLevelPostRestart()
|
|||
UWorld *InWorld = CarlaSettings->GetWorld();
|
||||
|
||||
const EQualityLevel QualityLevel = CarlaSettings->GetQualityLevel();
|
||||
|
||||
if (AppliedLowPostResetQualityLevel == QualityLevel)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// enable temporal changes of quality (prevent saving last quality settings to file)
|
||||
Scalability::ToggleTemporaryQualityLevels(true);
|
||||
|
||||
switch (QualityLevel)
|
||||
{
|
||||
case EQualityLevel::Low:
|
||||
|
@ -159,13 +165,17 @@ void UCarlaSettingsDelegate::CheckCarlaSettings(UWorld *world)
|
|||
|
||||
void UCarlaSettingsDelegate::LaunchLowQualityCommands(UWorld *world) const
|
||||
{
|
||||
if (!world)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// launch commands to lower quality settings
|
||||
GEngine->Exec(world, TEXT("r.DefaultFeature.MotionBlur 0"));
|
||||
GEngine->Exec(world, TEXT("r.DefaultFeature.Bloom 0"));
|
||||
GEngine->Exec(world, TEXT("r.DefaultFeature.AmbientOcclusion 0"));
|
||||
GEngine->Exec(world, TEXT("r.AmbientOcclusionLevels 0"));
|
||||
GEngine->Exec(world, TEXT("r.DefaultFeature.AmbientOcclusionStaticFraction 0"));
|
||||
GEngine->Exec(world, TEXT("r.DefaultFeature.AutoExposure 0"));
|
||||
GEngine->Exec(world, TEXT("r.RHICmdBypass 0"));
|
||||
GEngine->Exec(world, TEXT("r.DefaultFeature.AntiAliasing 2"));
|
||||
GEngine->Exec(world, TEXT("r.Streaming.PoolSize 2000"));
|
||||
|
@ -207,6 +217,8 @@ void UCarlaSettingsDelegate::LaunchLowQualityCommands(UWorld *world) const
|
|||
GEngine->Exec(world, TEXT("r.OcclusionQueryLocation 1"));
|
||||
// GEngine->Exec(world,TEXT("r.BasePassOutputsVelocity 0")); //--> readonly
|
||||
// GEngine->Exec(world,TEXT("r.DetailMode 0")); //-->will change to lods 0
|
||||
GEngine->Exec(world, TEXT("r.DefaultFeature.AutoExposure 1"));
|
||||
|
||||
}
|
||||
|
||||
void UCarlaSettingsDelegate::SetAllRoads(
|
||||
|
@ -357,6 +369,7 @@ void UCarlaSettingsDelegate::LaunchEpicQualityCommands(UWorld *world) const
|
|||
{
|
||||
return;
|
||||
}
|
||||
|
||||
GEngine->Exec(world, TEXT("r.AmbientOcclusionLevels -1"));
|
||||
GEngine->Exec(world, TEXT("r.RHICmdBypass 1"));
|
||||
GEngine->Exec(world, TEXT("r.DefaultFeature.AntiAliasing 2"));
|
||||
|
|
Loading…
Reference in New Issue