Navigation
API > API/Runtime > API/Runtime/Landscape
Utility class that contains everything necessary to perform the batched merge : scratch render targets, list of batches, etc.
| Name | FMergeRenderContext |
| Type | class |
| Header File | /Engine/Source/Runtime/Landscape/Public/LandscapeEditLayerMergeRenderContext.h |
| Include Path | #include "LandscapeEditLayerMergeRenderContext.h" |
Syntax
class FMergeRenderContext : public UE::Landscape::EditLayers::FMergeContext
Inheritance Hierarchy
- FMergeContext → FMergeRenderContext
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FMergeRenderContext
(
FMergeRenderContext&& Other |
LandscapeEditLayerMergeRenderContext.h | ||
FMergeRenderContext
(
const FMergeRenderContext& Other |
LandscapeEditLayerMergeRenderContext.h | ||
FMergeRenderContext
(
const FMergeContext& InMergeContext |
LandscapeEditLayerMergeRenderContext.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FMergeRenderContext() |
LandscapeEditLayerMergeRenderContext.h |
Structs
| Name | Remarks |
|---|---|
| FOnRenderBatchTargetGroupDoneParams |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| NumBlendRenderTargets | int32 | Blending is pretty much what we only do during the merge. | LandscapeEditLayerMergeRenderContext.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| BlackboardItems | TArray< TInstancedStruct< FLandscapeEditLayerMergeRenderBlackboardItem > > | Generic data struct to store some data to pass around throughout the context's lifetime. | LandscapeEditLayerMergeRenderContext.h | |
| BlendRenderTargets | TStaticArray< ULandscapeScratchRenderTarget *, NumBlendRenderTargets > | Render targets that are used throughout the blending operations (they could be texture arrays in the case of multiple weightmaps) | LandscapeEditLayerMergeRenderContext.h | |
| ComponentIdRenderTarget | ULandscapeScratchRenderTarget * | Render targets storing the id (uint32, stored as a RTF_R32f) of the component within the batch that each pixel belongs to. | LandscapeEditLayerMergeRenderContext.h | |
| ComponentToTargetLayerBitIndices | TMap< ULandscapeComponent *, TBitArray<> > | List of components involved in this merge and the target layers they're writing to (each bit corresponds to the target layer name in AllTargetLayerNames) | LandscapeEditLayerMergeRenderContext.h | |
| CurrentBlendRenderTargetWriteIndex | int32 | LandscapeEditLayerMergeRenderContext.h | ||
| CurrentRenderBatchIndex | int32 | Current batch being rendered | LandscapeEditLayerMergeRenderContext.h | |
| CurrentVisualLogOffset | FVector | Offset for visual debugging | LandscapeEditLayerMergeRenderContext.h | |
| FinalTargetLayerBitIndices | TBitArray | Final list of target layer names being involved in this merge context. | LandscapeEditLayerMergeRenderContext.h | |
| MaxLocalHeight | double | Maximum height of all components to render in local space. | LandscapeEditLayerMergeRenderContext.h | |
| MaxNeededNumSlices | int32 | Maximum number of slices needed by a given batch / target layer group in this context (means we won't ever need more than this number of slices in a given render target texture array during the whole merge) | LandscapeEditLayerMergeRenderContext.h | |
| MaxNeededResolution | FIntPoint | Maximum resolution needed by a given batch in this context (means we won't ever need more than this size of a render target during the whole merge) | LandscapeEditLayerMergeRenderContext.h | |
| MaxNumComponents | FIntPoint | Maximum number of components needed by a given batch in this context (means we won't ever render more than this amount of components during the whole merge) | LandscapeEditLayerMergeRenderContext.h | |
| RenderBatches | TArray< FMergeRenderBatch > | Successive batches of components being processed by this context. | LandscapeEditLayerMergeRenderContext.h | |
| TargetLayersToComponents | TArray< TSet< ULandscapeComponent * > > | Reverse lookup of ComponentToTargetLayerBitIndices : one entry per element in ComponentToTargetLayerBitIndices, each entry containing all of the components involved in this merge for this target layer | LandscapeEditLayerMergeRenderContext.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
T & AddBlackboardItem
(
TArgs&&... InArgs |
Create a new blackboard item of type T and adds it to the context's list | LandscapeEditLayerMergeRenderContext.h | |
FTransform ComputeVisualLogTransform
(
const FTransform& InTransform |
LandscapeEditLayerMergeRenderContext.h | ||
void CycleBlendRenderTargets
(
UE::Landscape::FRDGBuilderRecorder& RDGBuilderRecorder |
Cycle between the 3 render targets used for blending: Write becomes Read -> Read becomes ReadPrevious -> ReadPrevious becomes Write The new Write RT will be transitioned to state == InDesiredWriteAccess (if != ERHIAccess::None) The new Read RT will be transitioned to state ERHIAccess::SRVMask The new ReadPrevious RT will stay in state ERHIAccess::SRVMask | LandscapeEditLayerMergeRenderContext.h | |
void GenericBlendLayer
(
const FBlendParams& InBlendParams, |
Performs a generic blend assuming GetBlendRenderTargetWrite() is the RT that contains the layer to blend and GetBlendRenderTargetRead() the one that contains the result of the merge up until this layer. | LandscapeEditLayerMergeRenderContext.h | |
const TArray< TInstancedStruct< FLandscapeEditLayerMergeRenderBlackboardItem > > & GetAllBlackboardItems() |
LandscapeEditLayerMergeRenderContext.h | ||
T & GetBlackboardItem() |
LandscapeEditLayerMergeRenderContext.h | ||
TArray< T * > GetBlackboardItems() |
LandscapeEditLayerMergeRenderContext.h | ||
ULandscapeScratchRenderTarget * GetBlendRenderTargetRead() |
LandscapeEditLayerMergeRenderContext.h | ||
ULandscapeScratchRenderTarget * GetBlendRenderTargetReadPrevious() |
LandscapeEditLayerMergeRenderContext.h | ||
ULandscapeScratchRenderTarget * GetBlendRenderTargetWrite() |
LandscapeEditLayerMergeRenderContext.h | ||
ULandscapeScratchRenderTarget * GetComponentIdRenderTarget() |
LandscapeEditLayerMergeRenderContext.h | ||
const FMergeRenderBatch * GetCurrentRenderBatch() |
LandscapeEditLayerMergeRenderContext.h | ||
const int32 GetCurrentRenderBatchIdx() |
LandscapeEditLayerMergeRenderContext.h | ||
const TBitArray & GetFinalTargetLayerBitIndices() |
LandscapeEditLayerMergeRenderContext.h | ||
FIntPoint GetMaxNeededResolution() |
LandscapeEditLayerMergeRenderContext.h | ||
T & GetOrCreateBlackboardItem
(
TArgs&&... InArgs |
LandscapeEditLayerMergeRenderContext.h | ||
const TArray< FMergeRenderBatch > & GetRenderBatches() |
LandscapeEditLayerMergeRenderContext.h | ||
bool HasBlackboardItem() |
LandscapeEditLayerMergeRenderContext.h | ||
void IncrementVisualLogOffset() |
LandscapeEditLayerMergeRenderContext.h | ||
bool IsValid() |
LandscapeEditLayerMergeRenderContext.h | ||
bool IsVisualLogEnabled() |
LandscapeEditLayerMergeRenderContext.h | ||
void Render
(
TFunction< void(const FOnRenderBatchTargetGroupDoneParams&, UE::Landscape::FRDGBuilderRecorder&)> ... |
LandscapeEditLayerMergeRenderContext.h | ||
void RenderComponentIds
(
UE::Landscape::FRDGBuilderRecorder& RDGBuilderRecorder |
Render the component ids in this merge for this batch | LandscapeEditLayerMergeRenderContext.h | |
void RenderExpandedRenderTarget
(
UE::Landscape::FRDGBuilderRecorder& RDGBuilderRecorder |
Duplicates the vertex data from the (sub-)sections of the batch, assuming GetBlendRenderTargetRead() is the RT that is read from and GetBlendRenderTargetWrite() the one that is written to | LandscapeEditLayerMergeRenderContext.h | |
void ResetVisualLogOffset() |
LandscapeEditLayerMergeRenderContext.h | ||
T * TryGetBlackboardItem() |
LandscapeEditLayerMergeRenderContext.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static int32 GetVisualLogAlpha() |
LandscapeEditLayerMergeRenderContext.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FMergeRenderContext & operator=
(
const FMergeRenderContext& Other |
LandscapeEditLayerMergeRenderContext.h | ||
FMergeRenderContext & operator=
(
FMergeRenderContext&& Other |
LandscapeEditLayerMergeRenderContext.h |