UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FTextureRenderTargetVolumeResource Class Reference

#include <TextureRenderTargetVolumeResource.h>

+ Inheritance diagram for FTextureRenderTargetVolumeResource:

Public Member Functions

 FTextureRenderTargetVolumeResource (const class UTextureRenderTargetVolume *InOwner)
 
virtual class FTextureRenderTargetVolumeResourceGetTextureRenderTargetVolumeResource ()
 
virtual void InitRHI (FRHICommandListBase &RHICmdList) override
 
virtual void ReleaseRHI () override
 
virtual uint32 GetSizeX () const override
 
virtual uint32 GetSizeY () const override
 
virtual uint32 GetSizeZ () const override
 
virtual FIntPoint GetSizeXY () const override
 
FUnorderedAccessViewRHIRef GetUnorderedAccessViewRHI ()
 
float GetDisplayGamma () const override
 
virtual bool ReadPixels (TArray< FColor > &OutImageData, FReadSurfaceDataFlags InFlags=FReadSurfaceDataFlags(RCM_UNorm, CubeFace_MAX), FIntRect InSrcRect=FIntRect(0, 0, 0, 0)) override
 
virtual bool ReadFloat16Pixels (TArray< FFloat16Color > &OutImageData, FReadSurfaceDataFlags InFlags=FReadSurfaceDataFlags(RCM_UNorm, CubeFace_MAX), FIntRect InSrcRect=FIntRect(0, 0, 0, 0)) override
 
virtual bool ReadLinearColorPixels (TArray< FLinearColor > &OutImageData, FReadSurfaceDataFlags InFlags=FReadSurfaceDataFlags(RCM_UNorm, CubeFace_MAX), FIntRect InSrcRect=FIntRect(0, 0, 0, 0)) override
 
ENGINE_API bool ReadPixels (TArray< FColor > &OutImageData, int32 InDepthSlice, FIntRect InRect=FIntRect(0, 0, 0, 0))
 
ENGINE_API bool ReadPixels (TArray< FFloat16Color > &OutImageData, int32 InDepthSlice, FIntRect InRect=FIntRect(0, 0, 0, 0))
 
- Public Member Functions inherited from FTextureRenderTargetResource
 FTextureRenderTargetResource ()
 
virtual const FTextureRHIRefGetShaderResourceTexture () const override
 
virtual class FTextureRenderTarget2DResourceGetTextureRenderTarget2DResource ()
 
virtual class FTextureRenderTarget2DArrayResourceGetTextureRenderTarget2DArrayResource ()
 
virtual class FTextureRenderTargetCubeResourceGetTextureRenderTargetCubeResource ()
 
virtual void ClampSize (int32 SizeX, int32 SizeY)
 
virtual FRHIGPUMask GetGPUMask (FRHICommandListImmediate &RHICmdList) const final override
 
void SetActiveGPUMask (FRHIGPUMask InGPUMask)
 
- Public Member Functions inherited from FTextureResource
 FTextureResource ()
 
virtual ~FTextureResource ()
 
virtual bool IsProxy () const
 
virtual FTexture2DResourceGetTexture2DResource ()
 
virtual FTexture3DResourceGetTexture3DResource ()
 
virtual FTexture2DArrayResourceGetTexture2DArrayResource ()
 
virtual FStreamableTextureResourceGetStreamableTextureResource ()
 
virtual FVirtualTexture2DResourceGetVirtualTexture2DResource ()
 
virtual const FTexture2DResourceGetTexture2DResource () const
 
virtual const FTexture3DResourceGetTexture3DResource () const
 
virtual const FTexture2DArrayResourceGetTexture2DArrayResource () const
 
virtual const FStreamableTextureResourceGetStreamableTextureResource () const
 
virtual const FVirtualTexture2DResourceGetVirtualTexture2DResource () const
 
int32 GetCurrentMipCount () const
 
bool IsTextureRHIPartiallyResident () const
 
FRHITextureGetTexture2DRHI () const
 
FRHITextureGetTexture3DRHI () const
 
FRHITextureGetTexture2DArrayRHI () const
 
void SetTextureReference (FRHITextureReference *TextureReference)
 
FRHITextureReferenceGetTextureReference () const
 
- Public Member Functions inherited from FTexture
RENDERCORE_API FTexture ()
 
virtual RENDERCORE_API ~FTexture ()
 
RENDERCORE_API FTexture (const FTexture &)
 
RENDERCORE_API FTexture (FTexture &&)
 
RENDERCORE_API FTextureoperator= (const FTexture &Other)
 
RENDERCORE_API FTextureoperator= (FTexture &&Other)
 
const FTextureRHIRefGetTextureRHI ()
 
virtual RENDERCORE_API FString GetFriendlyName () const override
 
- Public Member Functions inherited from FRenderResource
RENDERCORE_API FRenderResource ()
 
RENDERCORE_API FRenderResource (ERHIFeatureLevel::Type InFeatureLevel)
 
RENDERCORE_API FRenderResource (const FRenderResource &)
 
RENDERCORE_API FRenderResource (FRenderResource &&)
 
RENDERCORE_API FRenderResourceoperator= (const FRenderResource &Other)
 
RENDERCORE_API FRenderResourceoperator= (FRenderResource &&Other)
 
virtual RENDERCORE_API ~FRenderResource ()
 
virtual RENDERCORE_API void InitResource (FRHICommandListBase &RHICmdList)
 
virtual RENDERCORE_API void ReleaseResource ()
 
RENDERCORE_API void UpdateRHI (FRHICommandListBase &RHICmdList)
 
bool IsInitialized () const
 
int32 GetListIndex () const
 
EInitPhase GetInitPhase () const
 
void SetOwnerName (FName InOwnerName)
 
FName GetOwnerName () const
 
void SetResourceName (FName InResourceName)
 
FName GetResourceName () const
 
- Public Member Functions inherited from FRenderTarget
ENGINE_API FRenderTarget ()
 
virtual ENGINE_API ~FRenderTarget ()
 
virtual ENGINE_API const FTextureRHIRefGetRenderTargetTexture () const
 
virtual ENGINE_API FUnorderedAccessViewRHIRef GetRenderTargetUAV () const
 
virtual ENGINE_API FRDGTextureRef GetRenderTargetTexture (FRDGBuilder &GraphBuilder) const
 
virtual EDisplayColorGamut GetDisplayColorGamut () const
 
virtual EDisplayOutputFormat GetDisplayOutputFormat () const
 
virtual bool GetSceneHDREnabled () const
 
virtual void ProcessToggleFreezeCommand ()
 
virtual bool HasToggleFreezeCommand ()
 
ENGINE_API bool ReadPixelsPtr (FColor *OutImageBytes, FReadSurfaceDataFlags InFlags=FReadSurfaceDataFlags(RCM_UNorm, CubeFace_MAX), FIntRect InSrcRect=FIntRect(0, 0, 0, 0))
 
ENGINE_API bool ReadFloat16Pixels (TArray< FFloat16Color > &OutImageData, ECubeFace CubeFace)
 
ENGINE_API bool ReadLinearColorPixelsPtr (FLinearColor *OutImageBytes, FReadSurfaceDataFlags InFlags=FReadSurfaceDataFlags(RCM_MinMax, CubeFace_MAX), FIntRect InSrcRect=FIntRect(0, 0, 0, 0))
 
- Public Member Functions inherited from FDeferredUpdateResource
 FDeferredUpdateResource ()
 
ENGINE_API void FlushDeferredResourceUpdate (FRHICommandListImmediate &RHICmdList)
 
ENGINE_API void ResetSceneTextureExtentsHistory ()
 

Protected Member Functions

virtual void UpdateDeferredResource (FRHICommandListImmediate &RHICmdList, bool bClearRenderTarget=true) override
 
- Protected Member Functions inherited from FTextureRenderTargetResource
void SetGPUMask (FRHIGPUMask InGPUMask)
 
- Protected Member Functions inherited from FRenderResource
void SetFeatureLevel (const FStaticFeatureLevel InFeatureLevel)
 
const FStaticFeatureLevel GetFeatureLevel () const
 
bool HasValidFeatureLevel () const
 
template<typename T >
FBufferRHIRef CreateRHIBuffer (FRHICommandListBase &RHICmdList, T &InOutResourceObject, uint32 ResourceCount, EBufferUsageFlags InBufferUsageFlags, const TCHAR *InDebugName)
 
void SetInitPhase (EInitPhase InInitPhase)
 
- Protected Member Functions inherited from FDeferredUpdateResource
ENGINE_API void AddToDeferredUpdateList (bool OnlyUpdateOnce)
 
ENGINE_API void RemoveFromDeferredUpdateList ()
 

Friends

class UTextureRenderTargetVolume
 

Additional Inherited Members

- Public Types inherited from FRenderResource
enum class  EInitPhase : uint8 { Pre , Default , MAX }
 
- Static Public Member Functions inherited from FTextureRenderTargetResource
static ENGINE_API bool IsSupportedFormat (EPixelFormat Format)
 
- Static Public Member Functions inherited from FRenderResource
static RENDERCORE_API void ReleaseRHIForAllResources ()
 
static RENDERCORE_API void InitPreRHIResources ()
 
static RENDERCORE_API void ChangeFeatureLevel (ERHIFeatureLevel::Type NewFeatureLevel)
 
static RENDERCORE_API FName SetScopeName (FName Name)
 
- Static Public Member Functions inherited from FRenderTarget
static float GetEngineDisplayGamma ()
 
- Static Public Member Functions inherited from FDeferredUpdateResource
static ENGINE_API void UpdateResources (FRHICommandListImmediate &RHICmdList)
 
static void ResetNeedsUpdate ()
 
static bool IsUpdateNeeded ()
 
- Public Attributes inherited from FTexture
FTextureRHIRef TextureRHI
 
FSamplerStateRHIRef SamplerStateRHI
 
FSamplerStateRHIRef DeferredPassSamplerStateRHI
 
double LastRenderTime = -FLT_MAX
 
FMipBiasFade MipBiasFade
 
bool bGreyScaleFormat = false
 
bool bIgnoreGammaConversions = false
 
bool bSRGB = false
 
- Public Attributes inherited from FRenderResource
ERenderResourceState ResourceState = ERenderResourceState::Default
 
- Static Protected Member Functions inherited from FTexture
static RENDERCORE_API FRHISamplerStateGetOrCreateSamplerState (const FSamplerStateInitializerRHI &Initializer)
 
- Static Protected Member Functions inherited from FRenderResource
static RENDERCORE_API FRHICommandListBaseGetImmediateCommandList ()
 
- Protected Attributes inherited from FTextureResource
FTextureReferenceRHIRef TextureReferenceRHI
 
- Protected Attributes inherited from FRenderTarget
FTextureRHIRef RenderTargetTextureRHI
 

Detailed Description

FTextureRenderTargetVolumeResource type for Volume render target textures.

Constructor & Destructor Documentation

◆ FTextureRenderTargetVolumeResource()

FTextureRenderTargetVolumeResource::FTextureRenderTargetVolumeResource ( const class UTextureRenderTargetVolume InOwner)
inline

Constructor

Parameters
InOwner- Volume texture object to create a resource for

Member Function Documentation

◆ GetDisplayGamma()

float FTextureRenderTargetVolumeResource::GetDisplayGamma ( ) const
overridevirtual

Render target resource should be sampled in linear color space

Returns
display gamma expected for rendering to this render target

Reimplemented from FTextureRenderTargetResource.

◆ GetSizeX()

uint32 FTextureRenderTargetVolumeResource::GetSizeX ( ) const
overridevirtual

Returns the width of the texture in pixels.

Implements FTextureRenderTargetResource.

◆ GetSizeXY()

FIntPoint FTextureRenderTargetVolumeResource::GetSizeXY ( ) const
overridevirtual

Implements FRenderTarget.

◆ GetSizeY()

uint32 FTextureRenderTargetVolumeResource::GetSizeY ( ) const
overridevirtual

Returns the height of the texture in pixels.

Implements FTextureRenderTargetResource.

◆ GetSizeZ()

uint32 FTextureRenderTargetVolumeResource::GetSizeZ ( ) const
overridevirtual

Returns the depth of the texture in pixels.

Reimplemented from FTexture.

◆ GetTextureRenderTargetVolumeResource()

virtual class FTextureRenderTargetVolumeResource * FTextureRenderTargetVolumeResource::GetTextureRenderTargetVolumeResource ( )
inlinevirtual

Volume texture RT resource interface

Reimplemented from FTextureRenderTargetResource.

◆ GetUnorderedAccessViewRHI()

FUnorderedAccessViewRHIRef FTextureRenderTargetVolumeResource::GetUnorderedAccessViewRHI ( )
inline
Returns
UnorderedAccessView for rendering

◆ InitRHI()

void FTextureRenderTargetVolumeResource::InitRHI ( FRHICommandListBase RHICmdList)
overridevirtual

Initializes the dynamic RHI resource and/or RHI render target used by this resource. Called when the resource is initialized, or when reseting all RHI resources. Resources that need to initialize after a D3D device reset must implement this function. This is only called by the rendering thread.

Initializes the RHI render target resources used by this resource. Called when the resource is initialized, or when reseting all RHI resources. This is only called by the rendering thread.

Reimplemented from FRenderResource.

◆ ReadFloat16Pixels()

bool FTextureRenderTargetVolumeResource::ReadFloat16Pixels ( TArray< FFloat16Color > &  OutImageData,
FReadSurfaceDataFlags  InFlags = FReadSurfaceDataFlags(RCM_UNormCubeFace_MAX),
FIntRect  InSrcRect = FIntRect(0, 0, 0, 0) 
)
overridevirtual

Reads the render target's displayed pixels into the given color buffer.

Parameters
OutImageData- RGBA16F values will be stored in this buffer
InFlags- Additional information about how to to read the surface data (cube face, slice index, etc.)
InSrcRect- InSrcRect not specified means the whole rect
Returns
True if the read succeeded.

The default value for InFlags specifies RCM_UNorm which will cause values to be scaled into [0,1] ; use RCM_MinMax to retrieve values without change.

Unlike other RenderTarget Read functions, this only works if surface is PF_FloatRGBA exactly ; it does not convert. Prefer using FImageUtils::GetRenderTargetImage rather than calling this directly.

Reimplemented from FRenderTarget.

◆ ReadLinearColorPixels()

bool FTextureRenderTargetVolumeResource::ReadLinearColorPixels ( TArray< FLinearColor > &  OutImageData,
FReadSurfaceDataFlags  InFlags = FReadSurfaceDataFlags(RCM_UNormCubeFace_MAX),
FIntRect  InSrcRect = FIntRect(0, 0, 0, 0) 
)
overridevirtual

Reads the render target's displayed pixels into the given color buffer.

Parameters
OutImageData- Linear color array to store the value
InFlags- Additional information about how to to read the surface data (cube face, slice index, etc.)
InSrcRect- InSrcRect not specified means the whole rect
Returns
True if the read succeeded.

The default value for InFlags specifies RCM_UNorm which will cause values to be scaled into [0,1] ; use RCM_MinMax to retrieve values without change.

This will convert whatever the pixel format is to FLinearColor (if supported). Prefer using FImageUtils::GetRenderTargetImage rather than calling this directly.

Reimplemented from FRenderTarget.

◆ ReadPixels() [1/3]

bool FTextureRenderTargetVolumeResource::ReadPixels ( TArray< FColor > &  OutImageData,
FReadSurfaceDataFlags  InFlags = FReadSurfaceDataFlags(RCM_UNormCubeFace_MAX),
FIntRect  InSrcRect = FIntRect(0, 0, 0, 0) 
)
overridevirtual

Reads the render target's displayed pixels into a preallocated color buffer.

Parameters
OutImageData- RGBA8 values will be stored in this buffer
InFlags- Additional information about how to to read the surface data (cube face, slice index, etc.)
InSrcRect- InSrcRect not specified means the whole rect
Returns
True if the read succeeded.

This will convert whatever the pixel format is to FColor Prefer using FImageUtils::GetRenderTargetImage rather than calling this directly.

The default value for InFlags specifies RCM_UNorm which will cause values to be scaled into [0,1] ; use RCM_MinMax to retrieve values without change.

If the RenderTarget surface is float linear, it will converted to SRGB FColor, if InFlags.bLinearToGamma is set (which is on by default). If the RenderTarget surface is U8, then the SRGB/not state is unchanged, the U8 values are retrieved unchanged in either Linear or SRGB. Gamma is handled correctly automatically by FImageUtils::GetRenderTargetImage

Reimplemented from FRenderTarget.

◆ ReadPixels() [2/3]

PRAGMA_DISABLE_DEPRECATION_WARNINGS bool FTextureRenderTargetVolumeResource::ReadPixels ( TArray< FColor > &  OutImageData,
int32  InDepthSlice,
FIntRect  InRect = FIntRect(0, 0, 0, 0) 
)

Copy the texels of a single depth slice of the volume into an array.

Parameters
OutImageData- float16 values will be stored in this array.
InDepthSlice- which depth slice to read.
InRect- Rectangle of texels to copy.
Returns
true if the read succeeded.

◆ ReadPixels() [3/3]

bool FTextureRenderTargetVolumeResource::ReadPixels ( TArray< FFloat16Color > &  OutImageData,
int32  InDepthSlice,
FIntRect  InRect = FIntRect(0, 0, 0, 0) 
)

Copy the texels of a single depth slice of the cube into an array.

Parameters
OutImageData- float16 values will be stored in this array.
InDepthSlice- which depth slice to read.
InRect- Rectangle of texels to copy.
Returns
true if the read succeeded.

◆ ReleaseRHI()

void FTextureRenderTargetVolumeResource::ReleaseRHI ( )
overridevirtual

Releases the dynamic RHI resource and/or RHI render target resources used by this resource. Called when the resource is released, or when reseting all RHI resources. Resources that need to release before a D3D device reset must implement this function. This is only called by the rendering thread.

Release the RHI render target resources used by this resource. Called when the resource is released, or when reseting all RHI resources. This is only called by the rendering thread.

Reimplemented from FTexture.

◆ UpdateDeferredResource()

void FTextureRenderTargetVolumeResource::UpdateDeferredResource ( FRHICommandListImmediate RHICmdList,
bool  bClearRenderTarget = true 
)
overrideprotectedvirtual

Updates (resolves) the render target texture. Optionally clears each face of the render target to green. This is only called by the rendering thread.

Updates (resolves) the render target texture. Optionally clears each face of the render target to the clear color. This is only called by the rendering thread.

Implements FDeferredUpdateResource.

Friends And Related Symbol Documentation

◆ UTextureRenderTargetVolume


The documentation for this class was generated from the following files: