Fix lightmapper still using hacks to detect levelmesh changes

This commit is contained in:
RaveYard 2023-09-11 15:27:24 +02:00 committed by Magnus Norddahl
commit a340b69c79
3 changed files with 13 additions and 18 deletions

View file

@ -45,18 +45,17 @@ VkLightmap::~VkLightmap()
lights.Buffer->Unmap();
}
void VkLightmap::Raytrace(LevelMesh* level, const TArray<LevelMeshSurface*>& surfaces)
void VkLightmap::SetLevelMesh(LevelMesh* level)
{
bool newLevel = (mesh != level);
mesh = level;
if (newLevel)
{
UpdateAccelStructDescriptors();
UpdateAccelStructDescriptors();
lightmapRaytrace.Reset();
lightmapRaytraceLast.Reset();
}
lightmapRaytrace.Reset();
lightmapRaytraceLast.Reset();
}
void VkLightmap::Raytrace(const TArray<LevelMeshSurface*>& surfaces)
{
if (surfaces.Size())
{
lightmapRaytrace.active = true;