Choose your operating system:
Windows
macOS
Linux
Module |
|
Header |
/Engine/Plugins/Experimental/Water/Source/Runtime/Public/WaterUtils.h |
Include |
#include "WaterUtils.h" |
Source |
/Engine/Plugins/Experimental/Water/Source/Runtime/Private/WaterUtils.cpp |
static UTextureRenderTarget2D * GetOrCreateTransientRenderTarget2D
(
UTextureRenderTarget2D * InRenderTarget,
FName InRenderTargetName,
const FIntPoint & InSize,
ETextureRenderTargetFormat InFormat,
const FLinearColor & InClearColor,
bool bInAutoGenerateMipMaps
)
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
a compatible transient render target if InMaterialInterface is size/format/... is valid, nullptr otherwise
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 |