Open 3D Engine Atom Gem API Reference  2205.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends | List of all members
AZ::RPI::StreamingImageAsset Class Referencefinal

#include <StreamingImageAsset.h>

Inherits AZ::RPI::ImageAsset.

Public Member Functions

 AZ_RTTI (StreamingImageAsset, "{3C96A826-9099-4308-A604-7B19ADBF8761}", ImageAsset)
const Data::Asset< ImageMipChainAsset > & GetMipChainAsset (size_t mipChainIndex) const
 Returns an immutable reference to the mip chain associated by index into the array of mip chains.
void ReleaseMipChainAssets ()
 Release referenced ImageMipChainAssets.
const ImageMipChainAssetGetTailMipChain () const
 Get the last mip chain asset data which contains lowest level of mips.
size_t GetMipChainCount () const
 Returns the total number of mip chains in the image.
size_t GetMipChainIndex (size_t mipLevel) const
 Returns the mip chain index associated with the provided mip level.
size_t GetMipLevel (size_t mipChainIndex) const
 Given a mip chain index, returns the highest detail mip level associated with the mip chain.
size_t GetMipCount (size_t mipChainIndex) const
 Given a mip chain index, returns the number of mip levels in the chain.
AZStd::span< const uint8_t > GetSubImageData (uint32_t mip, uint32_t slice)
 Get image data for specified mip and slice. It may return empty array if its mipchain assets are not loaded.
const Data::AssetId & GetPoolAssetId () const
 Returns streaming image pool asset id of the pool that will be used to create the streaming image.
StreamingImageFlags GetFlags () const
 Returns the set of flags assigned to the image.
size_t GetTotalImageDataSize () const
 Returns the total size of pixel data across all mips, both in this StreamingImageAsset and in all child ImageMipChainAssets.
- Public Member Functions inherited from AZ::RPI::ImageAsset
 AZ_RTTI (ImageAsset, "{C53AB73A-5BC9-462D-805B-43BAFA8C8167}", Data::AssetData)
 AZ_CLASS_ALLOCATOR (ImageAsset, AZ::SystemAllocator, 0)
const RHI::ImageDescriptorGetImageDescriptor () const
 Returns the descriptor for the image.
const RHI::ImageViewDescriptorGetImageViewDescriptor () const
 Returns the default image view descriptor for the image.

Static Public Member Functions

static void Reflect (ReflectContext *context)
static constexpr uint32_t GetImageAssetSubId ()
 Streaming image assets are subId 1000, mipchain assets are 1001 + n.
- Static Public Member Functions inherited from AZ::RPI::ImageAsset
static void Reflect (AZ::ReflectContext *context)

Static Public Attributes

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


class StreamingImageAssetCreator
class StreamingImageAssetTester
class StreamingImageAssetHandler

Additional Inherited Members

- Protected Member Functions inherited from AZ::RPI::ImageAsset
void SetReady ()
- Protected Attributes inherited from AZ::RPI::ImageAsset
RHI::ImageDescriptor m_imageDescriptor
RHI::ImageViewDescriptor m_imageViewDescriptor

Detailed Description

Flat data associated with a streaming image. A streaming image contains a flat list of image mip chains. The first (0 index) mip chain in the list is called the 'Head'. This is the most detailed set of mips. The last index in the list is called the 'Tail'. Each streaming image defines its own list of mip chains, which are then atomic units of streaming. This is done to allow both the platform and individual image asset to control streaming granularity. On modern GPU hardware, the last N mips in the GPU mip chain are 'packed' into a single hardware page. The recommended pattern is to group the lowest detail mips into their own mip chain asset, up to the page size. Other approaches may include grouping mips into 'Head', 'Middle', and 'Tail' sets; this is because the amount of memory gained by dropping the first mip is so much higher than all the other mips combined. The design of the streaming image asset allows you to combine mips ideally for your platform, allowing the streaming controller to fetch optimized batches of data. Each streaming image is directly associated with a streaming image pool asset, which defines its own budget and streaming controller. This is an immutable, serialized asset. It can be either serialized-in or created dynamically using StreamingImageAssetCreator. See RPI::StreamingImage for runtime features based on this asset.

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