Navigation
API > API/Plugins > API/Plugins/Water > API/Plugins/Water/FWaterUtils
Description
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(RT, ...)
| Name | GetOrCreateTransientRenderTarget2DArray |
| Type | function |
| Header File | /Engine/Plugins/Experimental/Water/Source/Runtime/Public/WaterUtils.h |
| Include Path | #include "WaterUtils.h" |
| Source | /Engine/Plugins/Experimental/Water/Source/Runtime/Private/WaterUtils.cpp |
static UTextureRenderTarget2DArray * GetOrCreateTransientRenderTarget2DArray
(
UTextureRenderTarget2DArray * InRenderTarget,
FName InRenderTargetName,
const FIntPoint & InSize,
int32 InSlices,
ETextureRenderTargetFormat InFormat,
const FLinearColor & InClearColor,
bool bInAutoGenerateMipMaps
)
a compatible transient render target if InMaterialInterface is size/format/... is valid, nullptr otherwise
Parameters
| Name | Remarks |
|---|---|
| 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 |
| InSlices | is the number of slices of the render target |
| 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 |