![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <VirtualTextureBuiltData.h>
Public Member Functions | |
| uint32 | GetTileOffset (uint32 InAddress) const |
Public Attributes | |
| uint32 | Width = 0 |
| uint32 | Height = 0 |
| uint32 | MaxAddress = 0 |
| TArray< uint32 > | Addresses |
| TArray< uint32 > | Offsets |
Friends | |
| FArchive & | operator<< (FArchive &Ar, FVirtualTextureTileOffsetData &TileOffsetData) |
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.
Call at runtime to get the final tile offset in the chunk.
|
friend |
Serialization helper.
Sorted list of contiguous tile block addresses.
| uint32 FVirtualTextureTileOffsetData::Height = 0 |
| uint32 FVirtualTextureTileOffsetData::MaxAddress = 0 |
Upper bound Morton address for managed area.
Offset for each block in Addresses. An empty block is marked with ~0u.
| uint32 FVirtualTextureTileOffsetData::Width = 0 |