![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include "LandscapeGrassMapsBuilder.h"#include "Misc/ScopedSlowTask.h"#include "Landscape.h"#include "LandscapeAsyncTextureReadback.h"#include "LandscapePrivate.h"#include "LandscapeProxy.h"#include "LandscapeGrassWeightExporter.h"#include "MaterialCachedData.h"#include "LandscapeEditTypes.h"#include "LandscapeGrassType.h"#include "LandscapeSubsystem.h"#include "Logging/StructuredLog.h"#include "EngineUtils.h"#include "Materials/MaterialInstance.h"#include "Stats/Stats.h"#include "Components/InstancedStaticMeshComponent.h"#include "LandscapeTextureHash.h"#include "SceneInterface.h"Namespaces | |
| namespace | UE |
| namespace | UE::Landscape |
Macros | |
| #define | LOCTEXT_NAMESPACE "Landscape" |
| #define | GRASS_DEBUG_LOG(...) UE_LOG(LogGrass, Verbose, __VA_ARGS__) |
| #define | DEBUG_TRANSITION(StateRef, StageBefore, StageAfter) |
| #define DEBUG_TRANSITION | ( | StateRef, | |
| StageBefore, | |||
| StageAfter | |||
| ) |
| #define GRASS_DEBUG_LOG | ( | ... | ) | UE_LOG(LogGrass, Verbose, __VA_ARGS__) |
| #define LOCTEXT_NAMESPACE "Landscape" |
| DECLARE_CYCLE_STAT | ( | TEXT("Populate GrassMap") | , |
| STAT_PopulateGrassMap | , | ||
| STATGROUP_Foliage | |||
| ) |
| DECLARE_CYCLE_STAT | ( | TEXT("Prioritize Pending GrassMaps") | , |
| STAT_PrioritizePendingGrassMaps | , | ||
| STATGROUP_Foliage | |||
| ) |
| DECLARE_CYCLE_STAT | ( | TEXT("Remove Grass Instances") | , |
| STAT_RemoveGrassInstances | , | ||
| STATGROUP_Foliage | |||
| ) |
| DECLARE_CYCLE_STAT | ( | TEXT("Render GrassMap") | , |
| STAT_RenderGrassMap | , | ||
| STATGROUP_Foliage | |||
| ) |
| DECLARE_CYCLE_STAT | ( | TEXT("Update Component GrassMap ") | , |
| STAT_UpdateComponentGrassMaps | , | ||
| STATGROUP_Foliage | |||
| ) |
| FAutoConsoleVariableRef CVarGrassMapEvictAll(TEXT("grass.GrassMap.EvictAll"), GGrassMapEvictAll, TEXT("Remove all grass maps. In editor, or if runtime generation is enabled, the grass maps will repopulate automatically.")) | ( | TEXT("grass.GrassMap.EvictAll") | , |
| GGrassMapEvictAll | , | ||
| TEXT("Remove all grass maps. In editor, or if runtime generation is enabled, the grass maps will repopulate automatically.") | |||
| ) |
| FAutoConsoleVariableRef CVarGrassMapRenderEveryFrame(TEXT("grass.GrassMap.RenderEveryFrame"), GGrassMapRenderEveryFrame, TEXT("Forces re-rendering the grassmap for the landscape component(s) on any actors with a name containing the given string.")) | ( | TEXT("grass.GrassMap.RenderEveryFrame") | , |
| GGrassMapRenderEveryFrame | , | ||
| TEXT("Forces re-rendering the grassmap for the landscape component(s) on any actors with a name containing the given string.") | |||
| ) |
| FAutoConsoleVariableRef CVarGrassMapRenderEveryFrameDelay(TEXT("grass.GrassMap.RenderEveryFrameDelay"), GGrassMapRenderEveryFrameDelay, TEXT("When using grass.GrassMap.RenderEveryFrame, delays this many frames in between renders. Default 0.")) | ( | TEXT("grass.GrassMap.RenderEveryFrameDelay") | , |
| GGrassMapRenderEveryFrameDelay | , | ||
| TEXT("When using grass.GrassMap.RenderEveryFrame, delays this many frames in between renders. Default 0.") | |||
| ) |
| FAutoConsoleVariableRef CVarGrassMapUseAsyncFetch(TEXT("grass.GrassMap.UseAsyncFetch"), GGrassMapUseAsyncFetch, TEXT("Enable async fetch tasks to readback the runtime grass maps from the GPU. When disabled, it the fetch is performed on the game thread, when enabled it uses an async task instead.")) | ( | TEXT("grass.GrassMap.UseAsyncFetch") | , |
| GGrassMapUseAsyncFetch | , | ||
| TEXT("Enable async fetch tasks to readback the runtime grass maps from the GPU. When disabled, it the fetch is performed on the game thread, when enabled it uses an async task instead.") | |||
| ) |
| FAutoConsoleVariableRef CVarGrassMapUseRuntimeGeneration(TEXT("grass.GrassMap.UseRuntimeGeneration"), GGrassMapUseRuntimeGeneration, TEXT("Enable runtime grass map generation to save disk space and runtime memory. When enabled the grass density maps are not serialized and are built on the fly at runtime.")) | ( | TEXT("grass.GrassMap.UseRuntimeGeneration") | , |
| GGrassMapUseRuntimeGeneration | , | ||
| TEXT("Enable runtime grass map generation to save disk space and runtime memory. When enabled the grass density maps are not serialized and are built on the fly at runtime.") | |||
| ) |
|
extern |
|
extern |
| int32 GGrassMapAlwaysBuildRuntimeGenerationResources = 0 |
| int32 GGrassMapEvictAll = 0 |
| FString GGrassMapRenderEveryFrame |
| int32 GGrassMapRenderEveryFrameDelay = 0 |
| int32 GGrassMapUseAsyncFetch = 0 |
| int32 GGrassMapUseRuntimeGeneration = 0 |