ezEngine Release 26.9
Loading...
Searching...
No Matches
ezGALTextureRange Struct Reference

Defines a sub-set of a texture that can be bound in a shader. Default constructed means entire texture. Mainly used in ezBindGroupBuilder::BindTexture calls to map resources to shader bindings and other binding related methods. More...

#include <RendererFoundationDLL.h>

Public Member Functions

 EZ_DECLARE_POD_TYPE ()
 
bool operator== (const ezGALTextureRange &rhs) const
 
bool operator!= (const ezGALTextureRange &rhs) const
 
bool Overlaps (const ezGALTextureRange &other) const
 Returns true if this range and the other range overlap in both the array-slice and mip-level dimensions.
 

Static Public Member Functions

static ezGALTextureRange MakeFromMipRange (ezUInt8 uiBaseMipLevel=0, ezUInt8 uiMipLevels=EZ_GAL_ALL_MIP_LEVELS)
 Helper to just set mip levels without also having to set the array slice fields.
 
static ezGALTextureRange MakeFromRenderTargetRange (const ezGALRenderTargetRange &range)
 
static EZ_ALWAYS_INLINE ezUInt32 ComputeSubResourceIndex (ezUInt32 uiMipLevel, ezUInt32 uiLayer, const ezGALTextureRange &fullRange)
 Computes a flat sub-resource index for the given mip level and array layer within a texture whose full range is described by this instance. Index = uiMipLevel + uiLayer * m_uiMipLevels.
 

Public Attributes

ezUInt16 m_uiBaseArraySlice = 0
 Index of the first array slice to be used.
 
ezUInt16 m_uiArraySlices = EZ_GAL_ALL_ARRAY_SLICES
 Number of array slices to be used. If set to EZ_GAL_ALL_ARRAY_SLICES, the maximum number of allowed slices is used dependent on texture size and binding contraints.
 
ezUInt8 m_uiBaseMipLevel = 0
 The first mip level to be used.
 
ezUInt8 m_uiMipLevels = EZ_GAL_ALL_MIP_LEVELS
 Number of mip levels to be used. Ignored for UAVs. If set to EZ_GAL_ALL_MIP_LEVELS, the maximum number of allowed mip maps is used dependent on texture size.
 

Detailed Description

Defines a sub-set of a texture that can be bound in a shader. Default constructed means entire texture. Mainly used in ezBindGroupBuilder::BindTexture calls to map resources to shader bindings and other binding related methods.


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