Navigation
API > API/Runtime > API/Runtime/Engine > API/Runtime/Engine/FTextureRenderTargetVolumeResour- > API/Runtime/Engine/FTextureRenderTargetVolumeResour-/ReadPixels
- FRenderTarget::ReadPixels()
- FTextureRenderTargetVolumeResource::ReadPixels()
References
Module | Engine |
Header | /Engine/Source/Runtime/Engine/Public/TextureRenderTargetVolumeResource.h |
Include | #include "TextureRenderTargetVolumeResource.h" |
Source | /Engine/Source/Runtime/Engine/Private/TextureRenderTargetVolume.cpp |
virtual bool ReadPixels
(
TArray < FColor > & OutImageData,
FReadSurfaceDataFlags InFlags,
FIntRect InSrcRect
)
Remarks
Reads the render target's displayed pixels into a preallocated color buffer. 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 True if the read succeeded.
Parameters
Name | Description |
---|---|
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 |