UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FPixelFormatInfo Struct Reference

#include <PixelFormat.h>

Public Member Functions

 FPixelFormatInfo ()=delete
 
 FPixelFormatInfo (EPixelFormat InUnrealFormat, const TCHAR *InName, int32 InBlockSizeX, int32 InBlockSizeY, int32 InBlockSizeZ, int32 InBlockBytes, int32 InNumComponents, bool InSupported)
 
CORE_API uint64 Get2DImageSizeInBytes (uint32 InWidth, uint32 InHeight) const
 
CORE_API uint64 Get2DTextureMipSizeInBytes (uint32 InTextureWidth, uint32 InTextureHeight, uint32 InMipIndex) const
 
CORE_API uint64 Get2DTextureSizeInBytes (uint32 InTextureWidth, uint32 InTextureHeight, uint32 InMipCount) const
 
CORE_API uint64 Get3DImageSizeInBytes (uint32 InWidth, uint32 InHeight, uint32 InDepth) const
 
CORE_API uint64 Get3DTextureMipSizeInBytes (uint32 InTextureWidth, uint32 InTextureHeight, uint32 InTextureDepth, uint32 InMipIndex) const
 
CORE_API uint64 Get3DTextureSizeInBytes (uint32 InTextureWidth, uint32 InTextureHeight, uint32 InTextureDepth, uint32 InMipCount) const
 
CORE_API uint64 GetBlockCountForWidth (uint32 InWidth) const
 
CORE_API uint64 GetBlockCountForHeight (uint32 InHeight) const
 

Public Attributes

const TCHARName
 
EPixelFormat UnrealFormat
 
int32 BlockSizeX
 
int32 BlockSizeY
 
int32 BlockSizeZ
 
int32 BlockBytes
 
int32 NumComponents
 
EPixelFormatCapabilities Capabilities = EPixelFormatCapabilities::None
 
uint32 PlatformFormat { 0 }
 
uint8 Supported: 1
 
uint8 bIs24BitUnormDepthStencil: 1
 

Detailed Description

Information about a pixel format. The majority of this structure is valid after static init, however RHI does keep some state in here that is initialized by that module and should not be used by general use programs that don't have RHI (so noted in comments).

Constructor & Destructor Documentation

◆ FPixelFormatInfo() [1/2]

FPixelFormatInfo::FPixelFormatInfo ( )
delete

◆ FPixelFormatInfo() [2/2]

FPixelFormatInfo::FPixelFormatInfo ( EPixelFormat  InUnrealFormat,
const TCHAR InName,
int32  InBlockSizeX,
int32  InBlockSizeY,
int32  InBlockSizeZ,
int32  InBlockBytes,
int32  InNumComponents,
bool  InSupported 
)

Member Function Documentation

◆ Get2DImageSizeInBytes()

uint64 FPixelFormatInfo::Get2DImageSizeInBytes ( uint32  InWidth,
uint32  InHeight 
) const

Get 2D/3D image/texture size in bytes. This is for storage of the encoded image data, and does not adjust for any GPU alignment/padding constraints. It is also not valid for tiled or packed mip tails (i.e. cooked mips for consoles). Only use these when you know you're working with bog standard textures/images in block based pixel formats.

◆ Get2DTextureMipSizeInBytes()

uint64 FPixelFormatInfo::Get2DTextureMipSizeInBytes ( uint32  InTextureWidth,
uint32  InTextureHeight,
uint32  InMipIndex 
) const

◆ Get2DTextureSizeInBytes()

uint64 FPixelFormatInfo::Get2DTextureSizeInBytes ( uint32  InTextureWidth,
uint32  InTextureHeight,
uint32  InMipCount 
) const

◆ Get3DImageSizeInBytes()

uint64 FPixelFormatInfo::Get3DImageSizeInBytes ( uint32  InWidth,
uint32  InHeight,
uint32  InDepth 
) const

◆ Get3DTextureMipSizeInBytes()

uint64 FPixelFormatInfo::Get3DTextureMipSizeInBytes ( uint32  InTextureWidth,
uint32  InTextureHeight,
uint32  InTextureDepth,
uint32  InMipIndex 
) const

◆ Get3DTextureSizeInBytes()

uint64 FPixelFormatInfo::Get3DTextureSizeInBytes ( uint32  InTextureWidth,
uint32  InTextureHeight,
uint32  InTextureDepth,
uint32  InMipCount 
) const

◆ GetBlockCountForHeight()

uint64 FPixelFormatInfo::GetBlockCountForHeight ( uint32  InHeight) const

◆ GetBlockCountForWidth()

uint64 FPixelFormatInfo::GetBlockCountForWidth ( uint32  InWidth) const

Get the number of compressed blocks necessary to hold the given dimensions.

Member Data Documentation

◆ bIs24BitUnormDepthStencil

uint8 FPixelFormatInfo::bIs24BitUnormDepthStencil

◆ BlockBytes

int32 FPixelFormatInfo::BlockBytes

◆ BlockSizeX

int32 FPixelFormatInfo::BlockSizeX

◆ BlockSizeY

int32 FPixelFormatInfo::BlockSizeY

◆ BlockSizeZ

int32 FPixelFormatInfo::BlockSizeZ

◆ Capabilities

EPixelFormatCapabilities FPixelFormatInfo::Capabilities = EPixelFormatCapabilities::None

Per platform cabilities for the format (initialized by RHI module - invalid otherwise)

◆ Name

const TCHAR* FPixelFormatInfo::Name

◆ NumComponents

int32 FPixelFormatInfo::NumComponents

◆ PlatformFormat

uint32 FPixelFormatInfo::PlatformFormat { 0 }

Platform specific converted format (initialized by RHI module - invalid otherwise)

◆ Supported

uint8 FPixelFormatInfo::Supported

Whether the texture format is supported on the current platform/ rendering combination

◆ UnrealFormat

EPixelFormat FPixelFormatInfo::UnrealFormat

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