From eb641e142ec87d66229461dcc3eedd65b0a43e08 Mon Sep 17 00:00:00 2001 From: Wiktor Kocielski Date: Sat, 29 Jul 2023 01:00:07 +0300 Subject: [PATCH 1/2] ShadowOfMordor terrain fix --- Source/Engine/ShadowsOfMordor/Builder.Jobs.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/Engine/ShadowsOfMordor/Builder.Jobs.cpp b/Source/Engine/ShadowsOfMordor/Builder.Jobs.cpp index 59704800a..26204a94a 100644 --- a/Source/Engine/ShadowsOfMordor/Builder.Jobs.cpp +++ b/Source/Engine/ShadowsOfMordor/Builder.Jobs.cpp @@ -151,6 +151,12 @@ void ShadowsOfMordor::Builder::onJobRender(GPUContext* context) auto patch = terrain->GetPatch(entry.AsTerrain.PatchIndex); auto chunk = &patch->Chunks[entry.AsTerrain.ChunkIndex]; auto chunkSize = terrain->GetChunkSize(); + if (!patch->Heightmap) + { + LOG(Error, "Terrain actor {0} is missing heightmap for baking, skipping baking stage.", terrain->GetName()); + _wasStageDone = true; + return; + } const auto heightmap = patch->Heightmap.Get()->GetTexture(); Matrix world; From 383b21c108a7cf387a7834ee150f8cc2782686cd Mon Sep 17 00:00:00 2001 From: Wiktor Kocielski <118038102+Withaust@users.noreply.github.com> Date: Sat, 29 Jul 2023 18:55:29 +0300 Subject: [PATCH 2/2] Softlock fix --- Source/Engine/ShadowsOfMordor/Builder.Jobs.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/Engine/ShadowsOfMordor/Builder.Jobs.cpp b/Source/Engine/ShadowsOfMordor/Builder.Jobs.cpp index 26204a94a..afe384d6c 100644 --- a/Source/Engine/ShadowsOfMordor/Builder.Jobs.cpp +++ b/Source/Engine/ShadowsOfMordor/Builder.Jobs.cpp @@ -155,6 +155,7 @@ void ShadowsOfMordor::Builder::onJobRender(GPUContext* context) { LOG(Error, "Terrain actor {0} is missing heightmap for baking, skipping baking stage.", terrain->GetName()); _wasStageDone = true; + scene->EntriesLocker.Unlock(); return; } const auto heightmap = patch->Heightmap.Get()->GetTexture();