Navigation
API > API/Runtime > API/Runtime/Landscape
ULandscapeScratchRenderTarget holds a UTextureRenderTarget2D. It can be used in the landscape tools as transient memory by requesting/releasing an instance via ULandscapeEditResourcesSubsystem It contains information about the current state (ERHIAccess) of the resource in order to automate/minimize state transitions. In order to minimize memory consumption, the internal render target can be larger than what was requested. It's therefore important to take that into account when setting up draw calls on this render target and use GetEffectiveResolution() instead of the RT's resolution
| Name | ULandscapeScratchRenderTarget |
| Type | class |
| Header File | /Engine/Source/Runtime/Landscape/Public/LandscapeEditResourcesSubsystem.h |
| Include Path | #include "LandscapeEditResourcesSubsystem.h" |
Syntax
UCLASS (Transient)
class ULandscapeScratchRenderTarget : public UObject
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → ULandscapeScratchRenderTarget
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ULandscapeScratchRenderTarget() |
LandscapeEditResourcesSubsystem.h |
Classes
| Name | Remarks |
|---|---|
| FTransitionBatcherScope | |
| FTransitionInfo |
Structs
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bIsInUse | bool | Current state of the scratch render target : | LandscapeEditResourcesSubsystem.h | |
| CurrentRenderTargetParams | UE::Landscape::FScratchRenderTargetParams | LandscapeEditResourcesSubsystem.h | ||
| CurrentState | ERHIAccess | LandscapeEditResourcesSubsystem.h | ||
| RenderTarget | TObjectPtr< UTextureRenderTarget > | LandscapeEditResourcesSubsystem.h |
|
|
| RenderTargetFormat | ETextureRenderTargetFormat | BEGIN Un-mutable section The following variables are un-mutable after RenderTarget is initialized : | LandscapeEditResourcesSubsystem.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Clear
(
UE::Landscape::FRDGBuilderRecorder& RDGBuilderRecorder |
Perform a clear of the scratch texture | LandscapeEditResourcesSubsystem.h | |
void CopyFrom
(
const FCopyFromTextureParams& InCopyParams, |
Copies the content of the texture in parameter to the scratch texture (assuming the input texture is in CopySrc state already). | LandscapeEditResourcesSubsystem.h | |
void CopyFrom
(
const FCopyFromScratchRenderTargetParams& InCopyParams, |
Copies the content of the scratch texture in parameter to the scratch texture. | LandscapeEditResourcesSubsystem.h | |
FLinearColor GetClearColor() |
LandscapeEditResourcesSubsystem.h | ||
const UE::Landscape::FScratchRenderTargetParams & GetCurrentRenderTargetParams() |
LandscapeEditResourcesSubsystem.h | ||
ERHIAccess GetCurrentState() |
LandscapeEditResourcesSubsystem.h | ||
const FString & GetDebugName() |
LandscapeEditResourcesSubsystem.h | ||
int32 GetEffectiveNumSlices() |
LandscapeEditResourcesSubsystem.h | ||
FIntPoint GetEffectiveResolution() |
LandscapeEditResourcesSubsystem.h | ||
ETextureRenderTargetFormat GetFormat() |
LandscapeEditResourcesSubsystem.h | ||
int32 GetNumSlices() |
LandscapeEditResourcesSubsystem.h | ||
UTextureRenderTarget * GetRenderTarget() |
LandscapeEditResourcesSubsystem.h | ||
UTextureRenderTarget2D * GetRenderTarget2D() |
LandscapeEditResourcesSubsystem.h | ||
UTextureRenderTarget2DArray * GetRenderTarget2DArray() |
LandscapeEditResourcesSubsystem.h | ||
FIntPoint GetResolution() |
LandscapeEditResourcesSubsystem.h | ||
bool IsCompatibleWith
(
const UE::Landscape::FScratchRenderTargetParams& InParams |
LandscapeEditResourcesSubsystem.h | ||
bool IsInUse() |
LandscapeEditResourcesSubsystem.h | ||
bool IsTexture2D() |
LandscapeEditResourcesSubsystem.h | ||
bool IsTexture2DArray() |
LandscapeEditResourcesSubsystem.h | ||
void TransitionTo
(
ERHIAccess InStateAfter, |
Perform a transition of the scratch texture's RHIAccess | LandscapeEditResourcesSubsystem.h | |
UTextureRenderTarget2D * TryGetRenderTarget2D() |
LandscapeEditResourcesSubsystem.h | ||
UTextureRenderTarget2DArray * TryGetRenderTarget2DArray() |
LandscapeEditResourcesSubsystem.h |