From 9c6b2f190e31d2fc10895024c015b0dc4048815b Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Tue, 17 Oct 2023 18:30:48 +0200 Subject: [PATCH] Fix going out of bounds for the render area --- 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 e7e0e4f73..c5aefac18 100644 --- a/src/common/rendering/vulkan/accelstructs/vk_lightmap.cpp +++ b/src/common/rendering/vulkan/accelstructs/vk_lightmap.cpp @@ -126,7 +126,7 @@ void VkLightmap::SelectSurfaces(const TArray& surfaces) selectedSurfaces.Clear(); const int spacing = 5; // Note: the spacing is here to avoid that the resolve sampler finds data from other surface tiles - RectPacker packer(bakeImageSize - 2, bakeImageSize - 2, RectPacker::Spacing(spacing)); + RectPacker packer(bakeImageSize - spacing, bakeImageSize - spacing, RectPacker::Spacing(spacing)); for (int i = 0, count = surfaces.Size(); i < count; i++) {