RHICreateTargetableShaderResource2D

Syntax

void RHICreateTargetableShaderResource2D
(
    uint32 SizeX,
    uint32 SizeY,
    uint8 Format,
    uint32 NumMips,
    uint32 Flags,
    uint32 TargetableTextureFlags,
    bool bForceSeparateTargetAndShaderResource,
    FRHIResourceCreateInfo & CreateInfo,
    FTexture2DRHIRef & OutTargetableTexture,
    FTexture2DRHIRef & OutShaderResourceTexture,
    uint32 NumSamples
)

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.

References

Module

RHI

Header

Runtime/RHI/Public/RHIUtilities.h