Embree device/scene is used even after they fail init. Fix crash by early out. (This matches the behavior of GenerateCardRepresentationData).

Failed Embree init will leave FDistanceFieldVolumeData::IsValid() returning false.

#rb tiago.costa, mihnea.balta
#rnx
#preflight 63ff868dae54ee4ce945432b

[CL 24471347 by kevin ortegren in ue5-main branch]
This commit is contained in:
kevin ortegren
2023-03-01 16:53:19 -05:00
parent 39e895397a
commit f9272bdeba

View File

@@ -274,6 +274,12 @@ void FMeshUtilities::GenerateSignedDistanceFieldVolumeData(
check(EmbreeScene.bUseEmbree);
// If Embree setup fails, there will be no scene to operate on. Early out.
if (!EmbreeScene.EmbreeScene)
{
return;
}
// Whether to use an Embree Point Query to compute the closest unsigned distance. Rays will only be traced to determine backfaces visible for sign.
const bool bUsePointQuery = true;