Fix crash when trying to render outside the texture

This commit is contained in:
Magnus Norddahl 2023-09-19 01:30:15 +02:00
commit 90f046a579

View file

@ -96,7 +96,7 @@ void VkLightmap::SelectSurfaces(const TArray<LevelMeshSurface*>& 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++)
{