Fix misc bugs

This commit is contained in:
Magnus Norddahl 2023-10-16 17:37:26 +02:00
parent 156ef319af
commit 9ed4723e6e
3 changed files with 6 additions and 3 deletions

View file

@ -16,6 +16,8 @@ DoomLevelMesh::DoomLevelMesh(FLevel& doomMap, int samples, int lmdims)
StaticMesh = std::make_unique<DoomLevelSubmesh>();
static_cast<DoomLevelSubmesh*>(StaticMesh.get())->CreateStatic(doomMap);
static_cast<DoomLevelSubmesh*>(StaticMesh.get())->PackLightmapAtlas(0);
static_cast<DoomLevelSubmesh*>(StaticMesh.get())->BindLightmapSurfacesToGeometry(doomMap);
}
int DoomLevelMesh::AddSurfaceLights(const LevelMeshSurface* surface, LevelMeshLight* list, int listMaxSize)

View file

@ -46,14 +46,15 @@ void GPURaytracer::Raytrace(DoomLevelMesh* mesh)
printf(".");
raytrace->SetLevelMesh(mesh);
lightmap->SetLevelMesh(mesh);
raytrace->BeginFrame();
lightmap->BeginFrame();
// Keep baking until all surfaces have been processed
while (true)
{
printf(".");
raytrace->BeginFrame();
lightmap->BeginFrame();
TArray<LevelMeshSurface*> surfaces;
for (int i = 0, count = submesh->GetSurfaceCount(); i < count; i++)
{

View file

@ -1680,7 +1680,6 @@ VulkanInstanceBuilder::VulkanInstanceBuilder()
{
apiVersionsToTry = { VK_API_VERSION_1_2, VK_API_VERSION_1_1, VK_API_VERSION_1_0 };
OptionalExtension(VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME);
OptionalExtension(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME);
}
@ -1701,6 +1700,7 @@ VulkanInstanceBuilder& VulkanInstanceBuilder::RequireSurfaceExtensions(bool enab
if (enable)
{
RequireExtension(VK_KHR_SURFACE_EXTENSION_NAME);
OptionalExtension(VK_KHR_GET_SURFACE_CAPABILITIES_2_EXTENSION_NAME);
#if defined(VK_USE_PLATFORM_WIN32_KHR)
RequireExtension(VK_KHR_WIN32_SURFACE_EXTENSION_NAME);