UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
Landscape.cpp File Reference
#include "Landscape.h"
#include "Algo/Count.h"
#include "Algo/ForEach.h"
#include "Algo/IsSorted.h"
#include "Algo/Transform.h"
#include "Serialization/MemoryWriter.h"
#include "Serialization/BufferArchive.h"
#include "Serialization/MemoryReader.h"
#include "UObject/RenderingObjectVersion.h"
#include "UObject/UObjectIterator.h"
#include "UObject/PropertyPortFlags.h"
#include "UObject/ConstructorHelpers.h"
#include "UObject/DevObjectVersion.h"
#include "UObject/LinkerLoad.h"
#include "UObject/Package.h"
#include "Components/RuntimeVirtualTextureComponent.h"
#include "Framework/Application/SlateApplication.h"
#include "LandscapePrivate.h"
#include "LandscapeStreamingProxy.h"
#include "LandscapeInfo.h"
#include "LightMap.h"
#include "Engine/MapBuildDataRegistry.h"
#include "ShadowMap.h"
#include "LandscapeComponent.h"
#include "LandscapeLayerInfoObject.h"
#include "LandscapeInfoMap.h"
#include "EditorSupportDelegates.h"
#include "LandscapeMeshProxyComponent.h"
#include "LandscapeNaniteComponent.h"
#include "LandscapeRender.h"
#include "LandscapeModule.h"
#include "Logging/StructuredLog.h"
#include "Logging/TokenizedMessage.h"
#include "Logging/MessageLog.h"
#include "Misc/UObjectToken.h"
#include "Misc/MapErrors.h"
#include "Misc/PackageSegment.h"
#include "DerivedDataCacheInterface.h"
#include "Interfaces/ITargetPlatform.h"
#include "LandscapeMeshCollisionComponent.h"
#include "MaterialDomain.h"
#include "Materials/Material.h"
#include "LandscapeMaterialInstanceConstant.h"
#include "Engine/CollisionProfile.h"
#include "LandscapeMeshProxyActor.h"
#include "Materials/MaterialExpressionLandscapeLayerWeight.h"
#include "Materials/MaterialExpressionLandscapeLayerSwitch.h"
#include "Materials/MaterialExpressionLandscapeLayerSample.h"
#include "Materials/MaterialExpressionLandscapeLayerBlend.h"
#include "Materials/MaterialExpressionLandscapeVisibilityMask.h"
#include "Materials/MaterialInstance.h"
#include "Materials/MaterialInstanceDynamic.h"
#include "ProfilingDebugging/CookStats.h"
#include "ILandscapeSplineInterface.h"
#include "LandscapeGrassType.h"
#include "LandscapeSplineActor.h"
#include "LandscapeSplinesComponent.h"
#include "EngineGlobals.h"
#include "Engine/Engine.h"
#include "Engine/TextureRenderTarget2D.h"
#include "Engine/TextureRenderTarget2DArray.h"
#include "EngineUtils.h"
#include "ComponentRecreateRenderStateContext.h"
#include "LandscapeWeightmapUsage.h"
#include "LandscapeSubsystem.h"
#include "LandscapeGroup.h"
#include "LandscapeGrassMapsBuilder.h"
#include "LandscapeCulling.h"
#include "ContentStreaming.h"
#include "UObject/ObjectSaveContext.h"
#include "GlobalShader.h"
#include "ShaderParameterStruct.h"
#include "PixelShaderUtils.h"
#include "Rendering/Texture2DResource.h"
#include "RenderCaptureInterface.h"
#include "VisualLogger/VisualLogger.h"
#include "Components/HierarchicalInstancedStaticMeshComponent.h"
#include "NaniteSceneProxy.h"
#include "Misc/ArchiveMD5.h"
#include "LandscapeEditLayer.h"
#include "LandscapeTextureStorageProvider.h"
#include "LandscapeUtils.h"
#include "LandscapeUtilsPrivate.h"
#include "LandscapeVersion.h"
#include "UObject/FortniteMainBranchObjectVersion.h"
#include "UObject/FortniteReleaseBranchCustomObjectVersion.h"
#include "UObject/EditorObjectVersion.h"
#include "UObject/UObjectThreadContext.h"
#include "LandscapeDataAccess.h"
#include "LandscapeNotification.h"
#include "LandscapeHeightfieldCollisionComponent.h"
#include "SystemTextures.h"
#include "WorldPartition/WorldPartition.h"
#include "WorldPartition/WorldPartitionHelpers.h"
#include "WorldPartition/WorldPartitionHandle.h"
#include "WorldPartition/Landscape/LandscapeActorDesc.h"
#include "WorldPartition/WorldPartitionActorDescInstance.h"
#include "Engine/Texture2DArray.h"
#include "Modules/ModuleManager.h"

Classes

struct  FCompareULandscapeComponentClosest
 
class  FLandscapeMergeTexturesPS
 
class  FLandscapeResampleMergedTexturePS
 
class  FLandscapePackRGBAChannelsPS
 
struct  UE::Landscape::Private::RenderMergedTexture_RenderThread::FTexture2DResourceSubregion
 
struct  UE::Landscape::Private::RenderMergedTexture_RenderThread::FRenderInfo
 

Namespaces

namespace  UE
 
namespace  UE::Landscape
 
namespace  UE::Landscape::Private
 
namespace  UE::Landscape::Private::RenderMergedTexture_RenderThread
 
namespace  LandscapeInfoBoundsHelper
 

Macros

#define LOCTEXT_NAMESPACE   "Landscape"
 

Functions

 DEFINE_STAT (STAT_LandscapeDynamicDrawTime)
 
 DEFINE_STAT (STAT_LandscapeVFDrawTimeVS)
 
 DEFINE_STAT (STAT_LandscapeVFDrawTimePS)
 
 DEFINE_STAT (STAT_LandscapeComponentRenderPasses)
 
 DEFINE_STAT (STAT_LandscapeDrawCalls)
 
 DEFINE_STAT (STAT_LandscapeTriangles)
 
 DEFINE_STAT (STAT_LandscapeLayersRegenerateDrawCalls)
 
FAutoConsoleVariableSink OnStaticMeshLODDistanceScaleChangedSink (FConsoleCommandDelegate::CreateStatic(&OnStaticMeshLODDistanceScaleChanged))
 
FArchiveoperator<< (FArchive &Ar, FWeightmapLayerAllocationInfo &U)
 
 IMPLEMENT_GLOBAL_SHADER (FLandscapeMergeTexturesPS, "/Engine/Private/Landscape/LandscapeMergeTexturesPS.usf", "MergeTexture", SF_Pixel)
 
 IMPLEMENT_GLOBAL_SHADER (FLandscapeResampleMergedTexturePS, "/Engine/Private/Landscape/LandscapeMergeTexturesPS.usf", "ResampleMergedTexture", SF_Pixel)
 
 IMPLEMENT_GLOBAL_SHADER (FLandscapePackRGBAChannelsPS, "/Engine/Private/Landscape/LandscapeMergeTexturesPS.usf", "PackRGBAChannels", SF_Pixel)
 
void UE::Landscape::Private::RenderMergedTexture_RenderThread::RenderMergedTexture (const FRenderInfo &InRenderInfo, FRDGBuilder &GraphBuilder, const FRenderTargetBinding &InOutputRenderTargetBinding)
 
void ChangeLandscapeGuidIfObjectIsInstanced (FGuid &InOutGuid, UObject *InObject)
 
template<class ComponentClass >
void LandscapeInfoBoundsHelper::AccumulateComponentBounds (TConstArrayView< TObjectPtr< ComponentClass > > InComponents, FBox &InOutBounds)
 
void LandscapeInfoBoundsHelper::AccumulateBounds (const ALandscapeProxy *InLandscapeProxy, FBox &InOutBounds)
 

Variables

FAutoConsoleCommand CmdPrintNumLandscapeShadows (TEXT("landscape.PrintNumLandscapeShadows"), TEXT("Prints the number of landscape components that cast shadows."), FConsoleCommandDelegate::CreateStatic(PrintNumLandscapeShadows))
 
int32 UE::Landscape::RenderCaptureNextMergeRenders = 0
 
TAutoConsoleVariable< int32CVarRenderNaniteLandscape (TEXT("landscape.RenderNanite"), 1, TEXT("Render Landscape using Nanite."), ECVF_Scalability|ECVF_RenderThreadSafe)
 
int32 GGrassEnable
 
int32 GGrassMapUseRuntimeGeneration
 
FAutoConsoleVariableRef CVarGrassMapUseRuntimeGeneration
 

Macro Definition Documentation

◆ LOCTEXT_NAMESPACE

#define LOCTEXT_NAMESPACE   "Landscape"

Function Documentation

◆ ChangeLandscapeGuidIfObjectIsInstanced()

void ChangeLandscapeGuidIfObjectIsInstanced ( FGuid InOutGuid,
UObject InObject 
)

◆ DEFINE_STAT() [1/7]

◆ DEFINE_STAT() [2/7]

DEFINE_STAT ( STAT_LandscapeDrawCalls  )

◆ DEFINE_STAT() [3/7]

DEFINE_STAT ( STAT_LandscapeDynamicDrawTime  )

Landscape stats

◆ DEFINE_STAT() [4/7]

◆ DEFINE_STAT() [5/7]

DEFINE_STAT ( STAT_LandscapeTriangles  )

◆ DEFINE_STAT() [6/7]

DEFINE_STAT ( STAT_LandscapeVFDrawTimePS  )

◆ DEFINE_STAT() [7/7]

DEFINE_STAT ( STAT_LandscapeVFDrawTimeVS  )

◆ IMPLEMENT_GLOBAL_SHADER() [1/3]

IMPLEMENT_GLOBAL_SHADER ( FLandscapeMergeTexturesPS  ,
"/Engine/Private/Landscape/LandscapeMergeTexturesPS.usf"  ,
"MergeTexture"  ,
SF_Pixel   
)

◆ IMPLEMENT_GLOBAL_SHADER() [2/3]

IMPLEMENT_GLOBAL_SHADER ( FLandscapePackRGBAChannelsPS  ,
"/Engine/Private/Landscape/LandscapeMergeTexturesPS.usf"  ,
"PackRGBAChannels"  ,
SF_Pixel   
)

◆ IMPLEMENT_GLOBAL_SHADER() [3/3]

IMPLEMENT_GLOBAL_SHADER ( FLandscapeResampleMergedTexturePS  ,
"/Engine/Private/Landscape/LandscapeMergeTexturesPS.usf"  ,
"ResampleMergedTexture"  ,
SF_Pixel   
)

◆ OnStaticMeshLODDistanceScaleChangedSink()

FAutoConsoleVariableSink OnStaticMeshLODDistanceScaleChangedSink ( FConsoleCommandDelegate::CreateStatic &  OnStaticMeshLODDistanceScaleChanged)

◆ operator<<()

FArchive & operator<< ( FArchive Ar,
FWeightmapLayerAllocationInfo U 
)

Variable Documentation

◆ CmdPrintNumLandscapeShadows

FAutoConsoleCommand CmdPrintNumLandscapeShadows(TEXT("landscape.PrintNumLandscapeShadows"), TEXT("Prints the number of landscape components that cast shadows."), FConsoleCommandDelegate::CreateStatic(PrintNumLandscapeShadows)) ( TEXT("landscape.PrintNumLandscapeShadows")  ,
TEXT("Prints the number of landscape components that cast shadows." ,
FConsoleCommandDelegate::CreateStatic(PrintNumLandscapeShadows)   
)

◆ CVarGrassMapUseRuntimeGeneration

FAutoConsoleVariableRef CVarGrassMapUseRuntimeGeneration
extern

◆ CVarRenderNaniteLandscape

TAutoConsoleVariable< int32 > CVarRenderNaniteLandscape(TEXT("landscape.RenderNanite"), 1, TEXT("Render Landscape using Nanite."), ECVF_Scalability|ECVF_RenderThreadSafe) ( TEXT("landscape.RenderNanite")  ,
,
TEXT("Render Landscape using Nanite." ,
ECVF_Scalability ECVF_RenderThreadSafe 
)

◆ GGrassEnable

int32 GGrassEnable
extern

◆ GGrassMapUseRuntimeGeneration

int32 GGrassMapUseRuntimeGeneration
extern