Open 3D Engine Atom Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AZ::RPI::ImageMipChainAsset Class Referencefinal

#include <ImageMipChainAsset.h>

Inherits AZ::Data::AssetData.

Public Types

using MipSliceList = AZStd::fixed_vector< RHI::StreamingImageMipSlice, RHI::Limits::Image::MipCountMax >
 

Public Member Functions

 AZ_RTTI (ImageMipChainAsset, "{CB403C8A-6982-4C9F-8090-78C9C36FBEDB}", Data::AssetData)
 
 AZ_CLASS_ALLOCATOR (ImageMipChainAsset, AZ::SystemAllocator)
 
uint16_t GetMipLevelCount () const
 Returns the number of mip levels in the group.
 
uint16_t GetArraySize () const
 Returns the number of array slices in the group.
 
size_t GetSubImageCount () const
 Returns the number of sub-images in the group.
 
AZStd::span< const uint8_t > GetSubImageData (uint32_t mipSlice, uint32_t arraySlice) const
 Returns the sub-image data blob for a given mip slice and array slice (local to the group).
 
AZStd::span< const uint8_t > GetSubImageData (uint32_t subImageIndex) const
 Returns the sub-image data blob for a linear index (local to the group).
 
const RHI::ImageSubresourceLayoutGetSubImageLayout (uint32_t subImageIndex) const
 Returns the sub-image layout for a single sub-image by index.
 
const MipSliceList & GetMipSlices () const
 Returns the array of streaming image mip slices used to update RHI image content.
 
size_t GetImageDataSize () const
 Returns the total size of pixel data across all mips in this chain.
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 

Static Public Attributes

static const char * DisplayName
 
static const char * Extension
 
static const char * Group
 

Protected Member Functions

bool HandleAutoReload () override
 

Friends

class ImageMipChainAssetCreator
 
class ImageMipChainAssetHandler
 
class ImageMipChainAssetTester
 
class StreamingImageAssetCreator
 
class StreamingImageAssetHandler
 

Detailed Description

A container of packed image data. This asset is designed to represent image data located on disk. It may contain multiple mip levels, each with an array of sub-images. Support for multiple mip levels allows the streaming system to partition mip levels into groups. For example, the lowest N mips can be streamed at once and loaded as a unit. The mip data is defined independently from any parent image asset. Only the topology of the sub-images is known (i.e. the number of mip levels and the array size). The first slice (index 0) is the highest detail mip. The lowest detail mip is N-1. Since the mip chain is independent, the slice index is local to the container. That means you will have to translate a parent image mip slice to the local container slice index. This is an immutable, serialized asset. It can be either serialized-in or created dynamically using ImageMipChainAssetCreator. See RPI::ImageMipChain for runtime features based on this asset.


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