UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
LandscapeEditLayerTypes.h
Go to the documentation of this file.
1// Copyright Epic Games, Inc. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
6
7// ----------------------------------------------------------------------------------
8
10{
11
12// ----------------------------------------------------------------------------------
13
14// Must match EHeightmapBlendMode in LandscapeEditLayersHeightmaps.usf
16{
17 Additive = 0,
18 LegacyAlphaBlend, // In legacy alpha blend, the layer stores the height with premultiplied alpha (legacy landscape splines)
20
21 Num,
22};
23
24
25// ----------------------------------------------------------------------------------
26
27// Must match EHeightmapAlphaFlags in LandscapeCommon.ush
29{
30 None = 0, // aka Additive
31 Additive = 0, // The height is considered to be an offset (positive or negative)
32 Min = (1 << 0), // Only lower the existing landscape values
33 Max = (1 << 1), // Only raise the existing landscape values
34 AlphaBlend = (Min | Max), // Raise or lower the existing landscape values
35};
37
38
39// ----------------------------------------------------------------------------------
40
41// Must match EWeightmapBlendMode in LandscapeEditLayersWeightmaps.usf
43{
44 None = 0, // aka Additive
45 Additive = 0,
49
50 Num,
51};
52
53
54// ----------------------------------------------------------------------------------
55
56// Must match EWeightmapAlphaFlags in LandscapeCommon.ush
58{
59 None = 0, // aka Additive
60 Additive = 0, // The weight is considered to be an offset (positive)
61 Min = (1 << 0), // Only retain the min between the weight and the existing landscape weight value
62 Max = (1 << 1), // Only retain the max between the weight and the existing landscape weight value
63 AlphaBlend = (Min | Max), // Full alpha blending of the weight against the existing landscape weight value
64};
66
67
68// ----------------------------------------------------------------------------------
69
70// Must match EWeightmapTargetLayerFlags in LandscapeEditLayersWeightmaps.usf
72{
73 IsVisibilityLayer = (1 << 0), // This target layer is the visibility layer
74 IsWeightBlended = (1 << 1), // Blend the target layer's value with all the other target layers weights
75 Skip = (1 << 2), // This layer should be skipped from blending because it has not been rendered in this batch
76 IsPremultipliedAlphaWeightBlended = (1 << 3), // Blend the target layer's weight with other target layers' weights of the same target layer blend group, using the premultiplied alpha blend formula
77
78 None = 0
79};
81
82
83// ----------------------------------------------------------------------------------
84
85// Must match FFinalWeightBlendingTargetLayerInfo in LandscapeEditLayersWeightmaps.usf
90
91
92// ----------------------------------------------------------------------------------
93
94// Must match FMergeEditLayerTargetLayerInfo in LandscapeEditLayersWeightmaps.usf
96{
97 EWeightmapTargetLayerFlags Flags = EWeightmapTargetLayerFlags::None; // Additional info about this target layer
98 int32 BlendGroupIndex = INDEX_NONE; // Defines the target layer blend group that this target layer belongs to in this blend operation. -1 if not applicable
99};
100
101
102// ----------------------------------------------------------------------------------
103
104// Defines how heightmaps should be blended (see GenericBlendLayer)
115
116
117// ----------------------------------------------------------------------------------
118
119// Defines how weightmaps should be blended (see GenericBlendLayer)
142
143
144// ----------------------------------------------------------------------------------
145
146// Defines heightmaps+weightmaps blending params (see GenericBlendLayer)
147// There should be as many blend params as there are target layers to be blended in the blend operation, the others are simply passthrough
153
154
155#if WITH_EDITOR
156
157// ----------------------------------------------------------------------------------
158
160enum class ERenderFlags : uint8
161{
162 None = 0,
163
164 // Render mode flags
165 RenderMode_Recorded = (1 << 0), // This renderer can record its render commands into a single FRDGBuilder on the render thread (prefer this if possible), via a FRDGBuilderRecorder in "recording" mode. Exclusive with RenderMode_Immediate
166 RenderMode_Immediate = (1 << 1), // This renderer enqueues its render commands immediately either via the FRDGBuilderRecorder in "immediate" mode or just enqueuing render commands the usual way. Exclusive with RenderMode_Recorded
168
169 // Blend mode flags
170 BlendMode_SeparateBlend = (1 << 2), // This renderer has a separate render function for blending. When this flag is not set, only RenderLayer is called and is assumed to both render the layer and blend it. When it's set, RenderLayer will be followed by BlendLayer.
171
172 // Render layer group flags
173 RenderLayerGroup_SupportsGrouping = (1 << 3), // This renderer supports being rendered along with others in a series of RenderLayer steps before performing a single BlendLayer. Assumes BlendMode_SeparateBlend
174};
176
177#endif // WITH_EDITOR
178
179} //namespace UE::Landscape::EditLayers
@ INDEX_NONE
Definition CoreMiscDefines.h:150
FPlatformTypes::int32 int32
A 32-bit signed integer.
Definition Platform.h:1125
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
#define ENUM_CLASS_FLAGS(Enum)
Definition EnumClassFlags.h:6
uint8_t uint8
Definition binka_ue_file_header.h:8
uint32_t uint32
Definition binka_ue_file_header.h:6
Definition UnrealString.h.inl:34
Definition Landscape.h:55
EWeightmapBlendMode
Definition LandscapeEditLayerTypes.h:43
EWeightmapTargetLayerFlags
Definition LandscapeEditLayerTypes.h:72
EWeightmapAlphaFlags
Definition LandscapeEditLayerTypes.h:58
EHeightmapAlphaFlags
Definition LandscapeEditLayerTypes.h:29
EHeightmapBlendMode
Definition LandscapeEditLayerTypes.h:16
Definition LandscapeEditLayerTypes.h:149
FHeightmapBlendParams HeightmapBlendParams
Definition LandscapeEditLayerTypes.h:150
TMap< FName, FWeightmapBlendParams > WeightmapBlendParams
Definition LandscapeEditLayerTypes.h:151
EWeightmapTargetLayerFlags Flags
Definition LandscapeEditLayerTypes.h:88
Definition LandscapeEditLayerTypes.h:106
FHeightmapBlendParams(EHeightmapBlendMode InBlendMode)
Definition LandscapeEditLayerTypes.h:108
EHeightmapBlendMode BlendMode
Definition LandscapeEditLayerTypes.h:112
float Alpha
Definition LandscapeEditLayerTypes.h:113
Definition LandscapeEditLayerTypes.h:96
int32 BlendGroupIndex
Definition LandscapeEditLayerTypes.h:98
EWeightmapTargetLayerFlags Flags
Definition LandscapeEditLayerTypes.h:97
Definition LandscapeEditLayerTypes.h:121
EWeightmapBlendMode BlendMode
Definition LandscapeEditLayerTypes.h:139
float Alpha
Definition LandscapeEditLayerTypes.h:140
FWeightmapBlendParams(EWeightmapBlendMode InBlendMode)
Definition LandscapeEditLayerTypes.h:123
static const FWeightmapBlendParams & GetDefaultAdditiveBlendParams()
Definition LandscapeEditLayerTypes.h:133
static const FWeightmapBlendParams & GetDefaultPassthroughBlendParams()
Definition LandscapeEditLayerTypes.h:127