RHICreateTargetableShaderResourceCube

Creates 1 or 2 textures with the same dimensions/format.

Windows
MacOS
Linux

References

Module

RHI

Header

/Engine/Source/Runtime/RHI/Public/RHIUtilities.h

Include

#include "RHIUtilities.h"

Syntax

void RHICreateTargetableShaderResourceCube
(
    uint32 LinearSize,
    uint8 Format,
    uint32 NumMips,
    ETextureCreateFlags Flags,
    ETextureCreateFlags TargetableTextureFlags,
    bool bForceSeparateTargetAndShaderResource,
    FRHIResourceCreateInfo & CreateInfo,
    FTextureCubeRHIRef & OutTargetableTexture,
    FTextureCubeRHIRef & OutShaderResourceTexture
)

Remarks

Creates 1 or 2 textures with the same dimensions/format. If the RHI supports textures that can be used as both shader resources and render targets, and bForceSeparateTargetAndShaderResource=false, then a single texture is created. Otherwise two textures are created, one of them usable as a shader resource and resolve target, and one of them usable as a render target. Two texture references are always returned, but they may reference the same texture. If two different textures are returned, the render-target texture must be manually copied to the shader-resource texture.

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