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

#include <VirtualTextureBuiltData.h>

Public Member Functions

uint32 GetTileOffset (uint32 InAddress) const
 

Public Attributes

uint32 Width = 0
 
uint32 Height = 0
 
uint32 MaxAddress = 0
 
TArray< uint32Addresses
 
TArray< uint32Offsets
 

Friends

FArchiveoperator<< (FArchive &Ar, FVirtualTextureTileOffsetData &TileOffsetData)
 

Detailed Description

Compact structure to find tile offsets within a sparse chunk. The tiles are stored in Morton order inside the chunks. But for UDIM textures some areas of a mip level may be empty and so some tiles don't exist. We could store one chunk offset per tile, but that uses a large amount of memory. So we need a fast, but memory efficient way to get from tile index to chunk location. This structure splits the space into contiguous blocks of empty or non-empty tiles. If a block is non-empty it has an offset into the chunk, and if it is empty it has a special "empty" offset. Within a non-empty block, all tiles exist and are contiguous. Because the tiles are in Morton order and UDIMs are aligned on power of 2 boundaries the sequences are not usually very fragmented, so textures can be described with a low number of blocks. Lookup of tile index is done at the cost of a binary search of Morton address through the stored block addresses.

Member Function Documentation

◆ GetTileOffset()

uint32 FVirtualTextureTileOffsetData::GetTileOffset ( uint32  InAddress) const

Call at runtime to get the final tile offset in the chunk.

Friends And Related Symbol Documentation

◆ operator<<

FArchive & operator<< ( FArchive Ar,
FVirtualTextureTileOffsetData TileOffsetData 
)
friend

Serialization helper.

Member Data Documentation

◆ Addresses

TArray<uint32> FVirtualTextureTileOffsetData::Addresses

Sorted list of contiguous tile block addresses.

◆ Height

uint32 FVirtualTextureTileOffsetData::Height = 0

◆ MaxAddress

uint32 FVirtualTextureTileOffsetData::MaxAddress = 0

Upper bound Morton address for managed area.

◆ Offsets

TArray<uint32> FVirtualTextureTileOffsetData::Offsets

Offset for each block in Addresses. An empty block is marked with ~0u.

◆ Width

uint32 FVirtualTextureTileOffsetData::Width = 0

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