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::RHI::ImageViewDescriptor Struct Reference

Image views map to a range of mips / array slices in an image. More...

#include <ImageViewDescriptor.h>

Inherited by AZ::Vulkan::ImageViewDescriptor.

Public Member Functions

 AZ_TYPE_INFO (ImageViewDescriptor, "{7dc08a6e-5a1d-4730-b1fa-3a6e11bb7178}")
 
 AZ_CLASS_ALLOCATOR (ImageViewDescriptor, SystemAllocator)
 
 ImageViewDescriptor (Format overrideFormat)
 
bool operator== (const ImageViewDescriptor &other) const
 
HashValue64 GetHash (HashValue64 seed=HashValue64{ 0 }) const
 
bool IsSameSubResource (const ImageViewDescriptor &other) const
 

Static Public Member Functions

static void Reflect (AZ::ReflectContext *context)
 
static ImageViewDescriptor Create (Format overrideFormat, uint16_t mipSliceMin, uint16_t mipSliceMax)
 Creates a view with a custom format and mip chain range.
 
static ImageViewDescriptor Create (Format overrideFormat, uint16_t mipSliceMin, uint16_t mipSliceMax, uint16_t arraySliceMin, uint16_t arraySliceMax)
 Creates a view with a custom format, mip slice range, and array slice range.
 
static ImageViewDescriptor CreateCubemap ()
 
static ImageViewDescriptor CreateCubemap (Format overrideFormat, uint16_t mipSliceMin, uint16_t mipSliceMax)
 Creates a cubemap view with a specific format and mip slice range.
 
static ImageViewDescriptor CreateCubemap (Format overrideFormat, uint16_t mipSliceMin, uint16_t mipSliceMax, uint16_t cubeSliceMin, uint16_t cubeSliceMax)
 Creates a cubemap view with a specific format, mip slice range, and array slice range.
 
static ImageViewDescriptor CreateCubemapFace (Format overrideFormat, uint16_t mipSliceMin, uint16_t mipSliceMax, uint16_t faceSlice)
 Creates a cubemap face view with a specific format and mip slice range.
 
static ImageViewDescriptor Create3D (Format overrideFormat, uint16_t mipSliceMin, uint16_t mipSliceMax, uint16_t depthSliceMin, uint16_t depthSliceMax)
 Create a view for 3d texture.
 

Public Attributes

uint16_t m_mipSliceMin = 0
 Minimum mip slice offset.
 
uint16_t m_mipSliceMax = HighestSliceIndex
 Maximum mip slice offset. Must be greater than or equal to the min mip slice offset.
 
uint16_t m_arraySliceMin = 0
 Minimum array slice offset.
 
uint16_t m_arraySliceMax = HighestSliceIndex
 Maximum array slice offset. Must be greater or equal to the min array slice offset.
 
uint16_t m_depthSliceMin = 0
 Minimum depth slice offset.
 
uint16_t m_depthSliceMax = HighestSliceIndex
 Maximum depth slice offset. Must be greater or equal to the min depth slice offset.
 
Format m_overrideFormat = Format::Unknown
 
ImageBindFlags m_overrideBindFlags = ImageBindFlags::None
 The bind flags used by this view. Should be compatible with the bind flags of the underlying image.
 
uint32_t m_isCubemap = 0
 Whether to treat this image as a cubemap in the shader.
 
ImageAspectFlags m_aspectFlags = ImageAspectFlags::All
 Aspects of the image accessed by the view.
 
uint32_t m_isArray = 0
 

Static Public Attributes

static const uint16_t HighestSliceIndex = static_cast<uint16_t>(-1)
 

Detailed Description

Image views map to a range of mips / array slices in an image.

Member Function Documentation

◆ CreateCubemap()

static ImageViewDescriptor AZ::RHI::ImageViewDescriptor::CreateCubemap ( )
static

Creates a default view that maps to the full subresource range, but is set to interpret the array slices as cubemap faces.

Member Data Documentation

◆ m_isArray

uint32_t AZ::RHI::ImageViewDescriptor::m_isArray = 0

Whether to treat this image as texture array. This is needed because a texture array can have 1 layer only.

◆ m_overrideFormat

Format AZ::RHI::ImageViewDescriptor::m_overrideFormat = Format::Unknown

Typed format of the view, which may override a format in the image. A value of Unknown will default to the image format.


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