Navigation
API > API/Runtime > API/Runtime/Landscape
This UAssetUserData is attached to landscape heightmap UTexture2D's and tracks the heightmap texture's edge fixup state This is used by mip providers to apply edge fixup on mip streaming/creation, and also used by runtime dynamic fixup when neighboring landscape components are pulled in
| Name | ULandscapeHeightmapTextureEdgeFixup |
| Type | class |
| Header File | /Engine/Source/Runtime/Landscape/Classes/LandscapeEdgeFixup.h |
| Include Path | #include "LandscapeEdgeFixup.h" |
Syntax
UCLASS (NotBlueprintable, MinimalAPI, Within=Texture2D)
class ULandscapeHeightmapTextureEdgeFixup : public UAssetUserData
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UAssetUserData → ULandscapeHeightmapTextureEdgeFixup
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ULandscapeHeightmapTextureEdgeFixup
(
const FObjectInitializer& ObjectInitializer |
LandscapeEdgeFixup.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ActiveComponent | TObjectPtr< ULandscapeComponent > | LandscapeEdgeFixup.h | ||
| ActiveGroup | FLandscapeGroup * | LandscapeEdgeFixup.h | ||
| bDoNotPatchUntilGPUEdgeHashesUpdated | bool | LandscapeEdgeFixup.h | ||
| bForceUpdateSnapshot | bool | LandscapeEdgeFixup.h | ||
| bMapped | bool | Per-group settings (apply to the active group/component) | LandscapeEdgeFixup.h | |
| bUpdateGPUEdgeHashes | bool | LandscapeEdgeFixup.h | ||
| DisabledComponents | TArray< TWeakObjectPtr< ULandscapeComponent > > | Components that also want to use this heightmap & edge fixup, but were disabled as we can only support one active component at a time. | LandscapeEdgeFixup.h | |
| EdgeSnapshot | TSharedRef< FHeightmapTextureEdgeSnapshot, ESPMode::ThreadSafe > | SERIALIZED snapshot of the heightmap edge data COPY-ON-WRITE so we can use it safely from other threads. | LandscapeEdgeFixup.h | |
| GPUEdgeHashes | TStaticArray< uint32, 8 > | LandscapeEdgeFixup.h | ||
| GPUEdgeModifiedFlags | UE::Landscape::EEdgeFlags | LandscapeEdgeFixup.h | ||
| GroupCoord | FIntPoint | LandscapeEdgeFixup.h | ||
| HeightmapTexture | TObjectPtr< UTexture2D > | Transient runtime tracking data | LandscapeEdgeFixup.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Patch the GPU texture edges if needed, using the current snapshot and corresponding neighbor snapshots as source data. | LandscapeEdgeFixup.h | ||
const FIntPoint & GetGroupCoord() |
LandscapeEdgeFixup.h | ||
UTexture2D * GetHeightmapTexture() |
LandscapeEdgeFixup.h | ||
void GetNeighborSnapshots
(
UE::Landscape::FNeighborSnapshots& OutSnapshots |
Get the set of neighbor snapshots (nullptr if they don't exist), and gather existence and modified flags this is the data necessary to perform patching on a component | LandscapeEdgeFixup.h | |
bool IsActive() |
LandscapeEdgeFixup.h | ||
bool IsComponentActive
(
ULandscapeComponent* Component |
LandscapeEdgeFixup.h | ||
bool IsTextureEdgePatchingPaused() |
LandscapeEdgeFixup.h | ||
void PauseTextureEdgePatchingUntilGPUEdgeHashesUpdated() |
LandscapeEdgeFixup.h | ||
void RequestEdgeSnapshotUpdateFromHeightmapSource
(
bool bUpdateGPUEdgeHashes |
Request an update to the edge snapshot (capturing from the heightmap source). | LandscapeEdgeFixup.h | |
void RequestEdgeTexturePatchingForNeighbors
(
UE::Landscape::ENeighborFlags NeighborsNeedingPatching |
Request edge texture patching on a set of neighbors. | LandscapeEdgeFixup.h | |
virtual void Serialize
(
FArchive& Ar |
LandscapeEdgeFixup.h | ||
void SetActiveComponent
(
ULandscapeComponent* InComponent, |
Set the active landscape component, handling unmapping the old, and mapping the new. | LandscapeEdgeFixup.h | |
void SetHeightmapTexture
(
UTexture2D* InHeightmapTexture |
Set the heightmap texture (can only be called once) | LandscapeEdgeFixup.h | |
UE::Landscape::EEdgeFlags UpdateEdgeSnapshotFromHeightmapSource
(
const FVector& LandscapeGridScale, |
Update the edge snapshot from heightmap source. Returns the set of edges that changed since the previous snapshot. | LandscapeEdgeFixup.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void AddReferencedObjects
(
UObject* InThis, |
LandscapeEdgeFixup.h | ||
static void BlendCornerData
(
UE::Landscape::FHeightmapTexel& OutTexel, |
LandscapeEdgeFixup.h | ||
static void BlendEdgeData
(
FHeightmapTextureEdgeSnapshot& EdgeSnapshot, |
Helper functions that generate blended edge or corner data from snapshots, to use in texture patching. | LandscapeEdgeFixup.h | |
static ULandscapeHeightmapTextureEdgeFixup * FindOrCreateFor
(
UTexture2D* TargetTexture |
[main thread] Find or Create an edge fixup class for the given heightmap texture. Will only create in editor (the data used to create is only available in editor) | LandscapeEdgeFixup.h | |
static int32 PatchTextureEdgesForSingleMip
(
int32 MipIndex, |
Patch all of the edges for a single texture mip. | LandscapeEdgeFixup.h | |
static int32 PatchTextureEdgesForStreamingMips
(
int32 FirstMipIndexInclusive, |
LandscapeEdgeFixup.h |