You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Lumen - remove far field (HLOD1) from LumenScene. HLOD1 won't use surface cache anyway. Also added some LumenScene object dumping for debugging.
#preflight 611ec5b6aabad10001625184 #ROBOMERGE-SOURCE: CL 17242187 via CL 17269024 #ROBOMERGE-BOT: STARSHIP (Main -> Release-Engine-Test) (v858-17259218) [CL 17269355 by krzysztof narkowicz in ue5-release-engine-test branch]
This commit is contained in:
@@ -481,7 +481,9 @@ bool TrackPrimitiveForLumenScene(const FPrimitiveSceneProxy* Proxy)
|
||||
// For now Lumen depends on the distance field representation.
|
||||
// This also makes sure that non opaque things won't get included in Lumen Scene
|
||||
&& Proxy->SupportsDistanceFieldRepresentation()
|
||||
&& (Proxy->IsDrawnInGame() || Proxy->CastsHiddenShadow());
|
||||
&& (Proxy->IsDrawnInGame() || Proxy->CastsHiddenShadow())
|
||||
// Exclude far field proxies as those won't use surface cache
|
||||
&& !Proxy->IsRayTracingFarField();
|
||||
|
||||
return bTrack;
|
||||
}
|
||||
@@ -1298,7 +1300,7 @@ bool FLumenSceneData::EvictOldestAllocation(bool bForceEvict, TSparseUniqueList<
|
||||
return false;
|
||||
}
|
||||
|
||||
void FLumenSceneData::DumpStats(const FDistanceFieldSceneData& DistanceFieldSceneData)
|
||||
void FLumenSceneData::DumpStats(const FDistanceFieldSceneData& DistanceFieldSceneData, bool bDumpMeshDistanceFields, bool bDumpPrimitiveGroups)
|
||||
{
|
||||
const FIntPoint PageAtlasSizeInPages = GetDesiredPhysicalAtlasSizeInPages();
|
||||
const int32 NumPhysicalPages = PageAtlasSizeInPages.X * PageAtlasSizeInPages.Y;
|
||||
@@ -1391,4 +1393,30 @@ void FLumenSceneData::DumpStats(const FDistanceFieldSceneData& DistanceFieldScen
|
||||
UE_LOG(LogRenderer, Log, TEXT(" SceneInstanceIndexToMeshCardsIndexBuffer: %.3fMb"), SceneInstanceIndexToMeshCardsIndexBuffer.NumBytes / (1024.0f * 1024.0f));
|
||||
UE_LOG(LogRenderer, Log, TEXT(" UploadBuffer: %.3fMb"), UploadBuffer.GetNumBytes() / (1024.0f * 1024.0f));
|
||||
UE_LOG(LogRenderer, Log, TEXT(" ByteBufferUploadBuffer: %.3fMb"), ByteBufferUploadBuffer.GetNumBytes() / (1024.0f * 1024.0f));
|
||||
|
||||
if (bDumpMeshDistanceFields)
|
||||
{
|
||||
DistanceFieldSceneData.ListMeshDistanceFields(true);
|
||||
}
|
||||
|
||||
if (bDumpPrimitiveGroups)
|
||||
{
|
||||
#if STATS
|
||||
UE_LOG(LogRenderer, Log, TEXT("*** LumenScene Primitives ***"));
|
||||
|
||||
for (const FLumenPrimitiveGroup& PrimitiveGroup : PrimitiveGroups)
|
||||
{
|
||||
for (const FPrimitiveSceneInfo* ScenePrimitive : PrimitiveGroup.Primitives)
|
||||
{
|
||||
if (ScenePrimitive && ScenePrimitive->Proxy)
|
||||
{
|
||||
UE_LOG(LogRenderer, Log, TEXT("Group:%d InstanceIndex:%d %s"),
|
||||
PrimitiveGroup.RayTracingGroupMapElementId.GetIndex(),
|
||||
PrimitiveGroup.PrimitiveInstanceIndex,
|
||||
*ScenePrimitive->Proxy->GetStatId().GetName().ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -425,7 +425,7 @@ public:
|
||||
return PendingAddOperations.Num() > 0 || PendingUpdateOperations.Num() > 0 || PendingRemoveOperations.Num() > 0;
|
||||
}
|
||||
|
||||
void DumpStats(const FDistanceFieldSceneData& DistanceFieldSceneData);
|
||||
void DumpStats(const FDistanceFieldSceneData& DistanceFieldSceneData, bool bDumpMeshDistanceFields, bool bDumpPrimitiveGroups);
|
||||
bool UpdateAtlasSize();
|
||||
void RemoveAllMeshCards();
|
||||
void UploadPageTable(FRDGBuilder& GraphBuilder);
|
||||
|
||||
@@ -238,7 +238,7 @@ int32 GLumenSceneDumpStats = 0;
|
||||
FAutoConsoleVariableRef CVarLumenSceneDumpStats(
|
||||
TEXT("r.LumenScene.DumpStats"),
|
||||
GLumenSceneDumpStats,
|
||||
TEXT("Whether to log Lumen scene stats on the next frame."),
|
||||
TEXT("Whether to log Lumen scene stats on the next frame. 2 - dump mesh DF. 3 - dump LumenScene objects."),
|
||||
ECVF_RenderThreadSafe
|
||||
);
|
||||
|
||||
@@ -903,12 +903,10 @@ void FDeferredShadingSceneRenderer::LumenScenePDIVisualization()
|
||||
|
||||
if (GLumenSceneDumpStats)
|
||||
{
|
||||
LumenSceneData.DumpStats(DistanceFieldSceneData);
|
||||
|
||||
if (GLumenSceneDumpStats >= 2)
|
||||
{
|
||||
DistanceFieldSceneData.ListMeshDistanceFields(true);
|
||||
}
|
||||
LumenSceneData.DumpStats(
|
||||
DistanceFieldSceneData,
|
||||
/*bDumpMeshDistanceFields*/ GLumenSceneDumpStats == 2,
|
||||
/*bDumpPrimitiveGroups*/ GLumenSceneDumpStats == 3);
|
||||
|
||||
GLumenSceneDumpStats = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user