Fix surface index passed to glsl

This commit is contained in:
RaveYard 2023-09-08 23:55:03 +02:00 committed by Magnus Norddahl
commit 6ccb92ef60
8 changed files with 67 additions and 30 deletions

View file

@ -557,15 +557,15 @@ void VulkanRenderDevice::SetLevelMesh(LevelMesh* mesh)
}
}
void VulkanRenderDevice::UpdateLightmaps(const TArray<LevelMeshSurface*>& surfaces)
void VulkanRenderDevice::UpdateLightmaps(const TArray<int>& surfaceIndices)
{
if (surfaces.Size() > 0)
if (surfaceIndices.Size() > 0)
{
auto levelMesh = lastMesh; // There's nothing more permanent than a temporary solution
if (levelMesh)
{
GetLightmap()->Raytrace(levelMesh, surfaces);
GetLightmap()->Raytrace(levelMesh, surfaceIndices);
}
}
}