FWaterUtils::GetOrCreateTransientRenderTarget2D

Creates a transient render target of the proper size/format/...

Windows
MacOS
Linux

References

Module

Water

Header

/Engine/Plugins/Experimental/Water/Source/Runtime/Public/WaterUtils.h

Include

#include "WaterUtils.h"

Source

/Engine/Plugins/Experimental/Water/Source/Runtime/Private/WaterUtils.cpp

Syntax

static UTextureRenderTarget2D * GetOrCreateTransientRenderTarget2D
(
    UTextureRenderTarget2D * InRenderTarget,
    FName InRenderTargetName,
    const FIntPoint & InSize,
    ETextureRenderTargetFormat InFormat,
    const FLinearColor & InClearColor,
    bool bInAutoGenerateMipMaps
)

Remarks

Creates a transient render target of the proper size/format/... or returns the existing one if it's compatible. InRenderTarget is read-only so it's up to the caller to decide to update or not the RT. Usually, the calling code will be : RT = FWaterUtils::GetOrCreateTransientRenderTarget2D

Returns

a compatible transient render target if InMaterialInterface is size/format/... is valid, nullptr otherwise

Parameters

Parameter

Description

InRenderTarget

is the current render target currently used. It will be the one returned if it's already compatible with the size/format/...

InRenderTargetName

is the UObject's name in case we need to create a MID

InSize

is the render target's size

InFormat

is the render target's format

InClearColor

is the render target's default clear color

bInAutoGenerateMipMaps

is for generating mipmaps automatically after rendering to the render target

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss