WIP surface list for raytracing

This commit is contained in:
RaveYard 2023-09-07 20:22:21 +02:00 committed by Magnus Norddahl
commit f95ffbe299
3 changed files with 15 additions and 8 deletions

View file

@ -540,8 +540,15 @@ void VulkanRenderDevice::SetLevelMesh(LevelMesh* mesh)
mesh->UpdateLightLists();
TArray<LevelMeshSurface*> surfaces;
surfaces.Reserve(mesh->GetSurfaceCount());
for (unsigned i = 0, count = mesh->GetSurfaceCount(); i < count; ++i)
{
surfaces[i] = mesh->GetSurface(i);
}
GetTextureManager()->CreateLightmap(mesh->LMTextureSize, mesh->LMTextureCount);
GetLightmap()->Raytrace(mesh);
GetLightmap()->Raytrace(mesh, surfaces);
}
}