From d4c7d6591229d784eda58fe88fcef230edc4bfb9 Mon Sep 17 00:00:00 2001 From: "adnan.mujkic" Date: Wed, 26 Aug 2026 19:49:25 +0200 Subject: [PATCH] Further optimizations and fix for exponential height fog and skylight intensity curve --- Config/DefaultEngine.ini | 2 +- .../WeatherClear/Curve_SkylightIntensity.uasset | 4 ++-- Content/Scripts/BP_TimeOfDay.uasset | 4 ++-- Content/UI/OptionsScreen.uasset | 4 ++-- .../E/XN/4VXPK4RYZHM8HZESMIR8K0.uasset | 4 ++-- Source/ProjectEleri/Private/TimeOfDayManager.cpp | 14 ++++++++++++-- Source/ProjectEleri/Public/TimeOfDayManager.h | 4 ++-- 7 files changed, 23 insertions(+), 13 deletions(-) diff --git a/Config/DefaultEngine.ini b/Config/DefaultEngine.ini index 9796fd33..fcfb2440 100644 --- a/Config/DefaultEngine.ini +++ b/Config/DefaultEngine.ini @@ -192,7 +192,7 @@ r.SSGI.Quality=4 r.VolumetricRenderTarget.Mode=1 r.VolumetricCloud.ViewRaySampleMaxCount=64 -r.DistanceFieldAO=0 +r.DistanceFieldAO=1 [/Script/LinuxTargetPlatform.LinuxTargetSettings] TargetArchitecture=X86_64UnknownLinuxGnu diff --git a/Content/GameData/Curves/Weather/WeatherClear/Curve_SkylightIntensity.uasset b/Content/GameData/Curves/Weather/WeatherClear/Curve_SkylightIntensity.uasset index 17111c05..1c89ab99 100644 --- a/Content/GameData/Curves/Weather/WeatherClear/Curve_SkylightIntensity.uasset +++ b/Content/GameData/Curves/Weather/WeatherClear/Curve_SkylightIntensity.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8174547c068fada720ec81cdc9968b4256fe8910a4ccb7bf62d8602c5c104b84 -size 4223 +oid sha256:89cd51c7d37111019cefe15a46c2e754a35e7b9beb2efc3ccaf0f24d18765838 +size 3996 diff --git a/Content/Scripts/BP_TimeOfDay.uasset b/Content/Scripts/BP_TimeOfDay.uasset index f953b7b3..3d03272c 100644 --- a/Content/Scripts/BP_TimeOfDay.uasset +++ b/Content/Scripts/BP_TimeOfDay.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:625fa6583e43cbb1ad68b1146cfaca5b8d5924b836774e1a5062dd26a3cd109e -size 489159 +oid sha256:91d356c93fc0cf2a8b05cae7ed0d69227e6a563179dac009b9bc3064e466c076 +size 489672 diff --git a/Content/UI/OptionsScreen.uasset b/Content/UI/OptionsScreen.uasset index 1697f7e7..9a2a3d92 100644 --- a/Content/UI/OptionsScreen.uasset +++ b/Content/UI/OptionsScreen.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:db799d986059a5122d1076a2b977c123a5f5fcf2b2b7db61c68e5bac174e7389 -size 1257003 +oid sha256:20710aafcd75b8206710683053fa6f2e295bfb609018a1d72256dc696fa67988 +size 1261731 diff --git a/Content/__ExternalActors__/Maps/Persistent_GameWorld/E/XN/4VXPK4RYZHM8HZESMIR8K0.uasset b/Content/__ExternalActors__/Maps/Persistent_GameWorld/E/XN/4VXPK4RYZHM8HZESMIR8K0.uasset index 6b6eb91b..30484a34 100644 --- a/Content/__ExternalActors__/Maps/Persistent_GameWorld/E/XN/4VXPK4RYZHM8HZESMIR8K0.uasset +++ b/Content/__ExternalActors__/Maps/Persistent_GameWorld/E/XN/4VXPK4RYZHM8HZESMIR8K0.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f32d9010418650cb6ae13fa154c6ea45d4591cd8fc80e64dfeee03eaa18f5a7b -size 14259 +oid sha256:3d5292e8002720abb919db78fe8fe351d6ad1cad4cd6eafee814a1cd48884c50 +size 14514 diff --git a/Source/ProjectEleri/Private/TimeOfDayManager.cpp b/Source/ProjectEleri/Private/TimeOfDayManager.cpp index 7cf2852c..d73c16db 100644 --- a/Source/ProjectEleri/Private/TimeOfDayManager.cpp +++ b/Source/ProjectEleri/Private/TimeOfDayManager.cpp @@ -475,11 +475,21 @@ void ATimeOfDayManager::ToggleTimeActive(bool bNewActive) TimeTicking = bNewActive; } -void ATimeOfDayManager::ToggleShadowsOnSkyLight(bool bActive) +void ATimeOfDayManager::ApplyUserGraphicsScalability(int32 Index) { if (skyLight) { - skyLight->SetCastShadows(bActive); + skyLight->SetCastShadows(Index > 2); + } + + if (sunLight && moonLight) + { + constexpr float ShadowDistanceByIndex[] = { 3000.f, 7000.f, 10000.f, 20000.f }; + constexpr float DistanceShadowDistanceByIndex[] = { 15000.f, 20000.f, 30000.f, 40000.f }; + sunLight->SetDynamicShadowDistanceMovableLight(ShadowDistanceByIndex[Index]); + sunLight->DistanceFieldShadowDistance = DistanceShadowDistanceByIndex[Index]; + moonLight->SetDynamicShadowDistanceMovableLight(ShadowDistanceByIndex[Index]); + moonLight->DistanceFieldShadowDistance = DistanceShadowDistanceByIndex[Index]; } } diff --git a/Source/ProjectEleri/Public/TimeOfDayManager.h b/Source/ProjectEleri/Public/TimeOfDayManager.h index 85d31b23..92dc8701 100644 --- a/Source/ProjectEleri/Public/TimeOfDayManager.h +++ b/Source/ProjectEleri/Public/TimeOfDayManager.h @@ -311,8 +311,8 @@ public: UFUNCTION(BlueprintCallable, Category = "Time of day") void ToggleTimeActive(bool bNewActive); - UFUNCTION(BlueprintCallable, Category = "Time of day") - void ToggleShadowsOnSkyLight(bool bActive); + UFUNCTION(BlueprintCallable, Category = "Time of day|Settings") + void ApplyUserGraphicsScalability(int32 Index); UFUNCTION(BlueprintCallable, Category = "Time of day") TArray GetCalendarDataForMonth(int32 Month = 1);