Minor fixes

This commit is contained in:
2026-08-26 16:19:45 +02:00
parent f3b090af3a
commit a1cb0b5f00
3 changed files with 3 additions and 8 deletions
-5
View File
@@ -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());
-1
View File
@@ -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;
+3 -2
View File
@@ -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