// Copyright Epic Games, Inc. All Rights Reserved. #pragma once #include "MaterialCacheMeshProcessor.h" #include "PrimitiveComponentId.h" class FPrimitiveSceneProxy; struct FMaterialCachePrimitiveCachedLayerCommands { FMaterialCachePrimitiveCachedLayerCommands() = default; /** No copy or move construction */ UE_NONCOPYABLE(FMaterialCachePrimitiveCachedLayerCommands); TArray StaticMeshBatchCommands; TOptional NaniteLayerShadingCommand; TOptional VertexInvariantShadingCommand; }; struct FMaterialCachePrimitiveCachedTagCommands { /** Lifetime of material tied to the proxy, any change invalidates the proxy, in turn clearing the cache */ TMap> Layers; }; struct FMaterialCachePrimitiveCachedCommands { /** All cached material layers for a given teg */ TMap Tags; }; struct FMaterialCachePrimitiveData { /** Proxy tied to the primitive */ FPrimitiveSceneProxy* Proxy = nullptr; /** All cached commands */ FMaterialCachePrimitiveCachedCommands CachedCommands; };