From a1cb0b5f0058f356935c777a48e6c99dad5b73b6 Mon Sep 17 00:00:00 2001 From: Wojtek Figat Date: Wed, 26 Aug 2026 16:19:45 +0200 Subject: [PATCH] Minor fixes --- Source/Engine/Platform/SDL/SDLWindow.cpp | 5 ----- Source/Engine/Platform/SDL/SDLWindow.h | 1 - Source/Engine/Renderer/RenderList.cpp | 5 +++-- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/Source/Engine/Platform/SDL/SDLWindow.cpp b/Source/Engine/Platform/SDL/SDLWindow.cpp index a87ebbd89..56351cacd 100644 --- a/Source/Engine/Platform/SDL/SDLWindow.cpp +++ b/Source/Engine/Platform/SDL/SDLWindow.cpp @@ -858,11 +858,6 @@ void SDLWindow::Focus() #endif -String SDLWindow::GetTitle() const -{ - return String(SDL_GetWindowTitle(_window)); -} - void SDLWindow::SetTitle(const StringView& title) { SDL_SetWindowTitle(_window, title.ToStringAnsi().Get()); diff --git a/Source/Engine/Platform/SDL/SDLWindow.h b/Source/Engine/Platform/SDL/SDLWindow.h index 3c5963f5a..a5909655e 100644 --- a/Source/Engine/Platform/SDL/SDLWindow.h +++ b/Source/Engine/Platform/SDL/SDLWindow.h @@ -97,7 +97,6 @@ public: float GetOpacity() const override; void SetOpacity(float opacity) override; void Focus() override; - String GetTitle() const override; void SetTitle(const StringView& title) override; DragDropEffect DoDragDrop(const StringView& data) override; DragDropEffect DoDragDrop(const StringView& data, const Float2& offset, Window* dragSourceWindow) override; diff --git a/Source/Engine/Renderer/RenderList.cpp b/Source/Engine/Renderer/RenderList.cpp index 2ffb606fe..67ef8b1d2 100644 --- a/Source/Engine/Renderer/RenderList.cpp +++ b/Source/Engine/Renderer/RenderList.cpp @@ -19,6 +19,7 @@ #include "Engine/Content/Assets/CubeTexture.h" #include "Engine/Level/Scene/Lightmap.h" #include "Engine/Level/Actors/PostFxVolume.h" +#include "Engine/Engine/Units.h" static_assert(sizeof(DrawCall) <= 288, "Too big draw call data size."); static_assert(sizeof(DrawCall::Surface) >= sizeof(DrawCall::Terrain), "Wrong draw call data size."); @@ -136,10 +137,10 @@ void RenderDirectionalLightData::SetShaderData(ShaderLightData& data, bool useSh bool RenderLocalLightData::CanRenderShadow(const RenderView& view) const { // Fade shadow on distance - const float fadeDistance = Math::Max(ShadowsFadeDistance, 0.1f); + const float fadeDistance = Math::Max(ShadowsFadeDistance, 0.01f); const float dstLightToView = Float3::Distance(Position, view.Position); const float fade = 1 - Math::Saturate((dstLightToView - Radius - ShadowsDistance + fadeDistance) / fadeDistance); - return fade > ZeroTolerance && Radius > 10 && RenderLightData::CanRenderShadow(view); + return fade > ZeroTolerance && Radius > METERS_TO_UNITS(0.1f) && RenderLightData::CanRenderShadow(view); } void RenderSpotLightData::SetShaderData(ShaderLightData& data, bool useShadow) const