From 90f046a579e0b7534053e6481830c4d9d17b4db9 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Tue, 19 Sep 2023 01:30:15 +0200 Subject: [PATCH] Fix crash when trying to render outside the texture --- src/common/rendering/vulkan/accelstructs/vk_lightmap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/rendering/vulkan/accelstructs/vk_lightmap.cpp b/src/common/rendering/vulkan/accelstructs/vk_lightmap.cpp index c49593b51..311196608 100644 --- a/src/common/rendering/vulkan/accelstructs/vk_lightmap.cpp +++ b/src/common/rendering/vulkan/accelstructs/vk_lightmap.cpp @@ -96,7 +96,7 @@ void VkLightmap::SelectSurfaces(const TArray& surfaces) selectedSurfaces.Clear(); const int spacing = 3; // Note: the spacing is here to avoid that the resolve sampler finds data from other surface tiles - RectPacker packer(bakeImageSize, bakeImageSize, RectPacker::Spacing(spacing)); + RectPacker packer(bakeImageSize - 2, bakeImageSize - 2, RectPacker::Spacing(spacing)); for (int i = 0, count = surfaces.Size(); i < count; i++) {