避免重复构建DF阴影,并且只在需要时保留网格的顶点数据
This commit is contained in:
parent
55fe2a8d29
commit
96824b4629
@ -57,6 +57,9 @@ static FAutoConsoleVariableRef CVarAOAsyncBuildQueue(
|
||||
//构建距离场
|
||||
void BuildMeshDistanceField(UStaticMesh* StaticMesh)
|
||||
{
|
||||
GDistanceFieldAsyncQueue2->CancelBuild(StaticMesh);
|
||||
GCardRepresentationAsyncQueue2->CancelBuild(StaticMesh);
|
||||
|
||||
//ref:StaticMesh.cpp 2782
|
||||
auto RenderData = StaticMesh->GetRenderData();
|
||||
if (RenderData->LODResources.IsValidIndex(0))
|
||||
|
@ -29,7 +29,7 @@ void RTGUtils::UpdateStaticMeshFromDynamicMesh(
|
||||
|
||||
UStaticMesh::FBuildMeshDescriptionsParams Params;
|
||||
Params.bFastBuild = true;
|
||||
StaticMesh->BuildFromMeshDescriptions(MeshDescriptionPtrs,Params);
|
||||
StaticMesh->BuildFromMeshDescriptions(MeshDescriptionPtrs, Params, true);
|
||||
|
||||
//在编辑器模式下,也使用自定义的距离场构建和MeshCard构建
|
||||
BuildMeshDistanceField(StaticMesh);
|
||||
|
Loading…
Reference in New Issue
Block a user