UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FStreamingRenderAsset Struct Reference

#include <StreamingTexture.h>

Public Types

enum  EOptionalMipsState : uint8 { OMS_NotCached , OMS_NoOptionalMips , OMS_HasOptionalMips , OMS_Num }
 

Public Member Functions

 FStreamingRenderAsset (UStreamableRenderAsset *InRenderAsset, TSharedPtr< int32, ESPMode::ThreadSafe > &InSimpleStreamableAssetManagerIndex, const int32 *NumStreamedMips, int32 NumLODGroups, const FRenderAssetStreamingSettings &Settings)
 
void UpdateStaticData (const FRenderAssetStreamingSettings &Settings)
 
void UpdateDynamicData (const int32 *NumStreamedMips, int32 NumLODGroups, const FRenderAssetStreamingSettings &Settings, bool bWaitForMipFading, TArray< UStreamableRenderAsset * > *DeferredTickCBAssets=nullptr)
 
FStreamableRenderResourceState UpdateStreamingStatus (bool bWaitForMipFading, TArray< UStreamableRenderAsset * > *DeferredTickCBAssets=nullptr)
 
int32 GetSize (int32 InMipCount) const
 
int32 GetWantedMipsFromSize (float Size, float InvMaxScreenSizeOverAllViews) const
 
void SetPerfectWantedMips_Async (float MaxSize, float MaxSize_VisibleOnly, float MaxScreenSizeOverAllViews, int32 MaxNumForcedLODs, bool InLooksLowRes, const FRenderAssetStreamingSettings &Settings)
 
int64 UpdateRetentionPriority_Async (bool bPrioritizeMesh)
 
int64 DropMaxResolution_Async (int32 NumDroppedMips)
 
int64 DropOneMip_Async ()
 
int64 KeepOneMip_Async ()
 
int64 GetDropMaxResMemDelta (int32 NumDroppedMips) const
 
int64 GetDropOneMipMemDelta () const
 
float GetMaxAllowedSize (float MaxScreenSizeOverAllViews) const
 
float GetNormalizedScreenSize (int32 NumMips) const
 
float GetLODScreenSize (int32 NumMips, float MaxScreenSizeOverAllViews) const
 
bool UpdateLoadOrderPriority_Async (const FRenderAssetStreamingSettings &Settings)
 
void UpdateOptionalMipsState_Async ()
 
void CancelStreamingRequest ()
 
void StreamWantedMips (FRenderAssetStreamingManager &Manager)
 
void CacheStreamingMetaData ()
 
void StreamWantedMipsUsingCachedData (FRenderAssetStreamingManager &Manager)
 
bool IsTexture () const
 
bool IsVirtualTexture () const
 
bool IsMesh () const
 
bool IsMissingTooManyMips () const
 
FORCEINLINE int32 GetPerfectWantedMips () const
 
FORCEINLINE bool IsMaxResolutionAffectedByGlobalBias () const
 
FORCEINLINE bool HasUpdatePending (bool bIsStreamingPaused, bool bHasViewPoint) const
 

Static Public Member Functions

static const TCHARGetStreamingAssetTypeStr (EStreamableRenderAssetType InAssetType)
 
static float GetDefaultExtraBoost (bool bUseNewMetrics)
 
static float GetExtraBoost (TextureGroup LODGroup, const FRenderAssetStreamingSettings &Settings)
 

Public Attributes

UStreamableRenderAssetRenderAsset
 
TSharedPtr< int32, ESPMode::ThreadSafeSimpleStreamableAssetManagerIndex
 
FIoFilenameHash OptionalFileHash = INVALID_IO_FILENAME_HASH
 
int32 LODGroup
 
float BoostFactor
 
union { 
 
   uint32   CumulativeLODSizes [FStreamableRenderResourceState::MAX_LOD_COUNT
 
   struct { 
 
      uint32   CumulativeLODSizes_Mesh [FStreamableRenderResourceState::MAX_LOD_COUNT/2] 
 
      float   LODScreenSizes [FStreamableRenderResourceState::MAX_LOD_COUNT/2] 
 
   }  
 
};  
 
float LastRenderTime
 
double InstanceRemovedTimestamp
 
float DynamicBoostFactor
 
int32 RetentionPriority
 
float NormalizedScreenSize
 
int32 LoadOrderPriority
 
int32 BudgetMipBias
 
int32 NoRefLODBias
 
int8 WantedMips
 
int8 NumForcedMips
 
int8 ResidentMips
 
int8 RequestedMips
 
int8 MinAllowedMips
 
int8 MaxAllowedMips
 
int8 NumMissingMips
 
int8 VisibleWantedMips
 
int8 HiddenWantedMips
 
int8 BudgetedMips
 
int8 CachedWantedMips
 
int8 CachedVisibleWantedMips
 
EStreamableRenderAssetType RenderAssetType
 
EOptionalMipsState OptionalMipsState
 
uint8 bIsVirtualTexture: 1
 
uint8 bLoadWithHigherPriority: 1
 
uint8 bIsTerrainTexture: 1
 
uint8 bForceFullyLoad: 1
 
uint8 bIgnoreStreamingMipBias: 1
 
uint8 bHasUpdatePending: 1
 
uint8 bForceFullyLoadHeuristic: 1
 
uint8 bUseUnkownRefHeuristic: 1
 
uint8 bLooksLowRes: 1
 
uint8 bMissingTooManyMips: 1
 
uint8 bCachedForceFullyLoadHeuristic: 1
 
TBitArray LevelIndexUsage
 

Detailed Description

Self-contained structure to manage a streaming texture/mesh, possibly on a separate thread.

Member Enumeration Documentation

◆ EOptionalMipsState

Enumerator
OMS_NotCached 
OMS_NoOptionalMips 
OMS_HasOptionalMips 
OMS_Num 

Constructor & Destructor Documentation

◆ FStreamingRenderAsset()

FStreamingRenderAsset::FStreamingRenderAsset ( UStreamableRenderAsset InRenderAsset,
TSharedPtr< int32, ESPMode::ThreadSafe > &  InSimpleStreamableAssetManagerIndex,
const int32 NumStreamedMips,
int32  NumLODGroups,
const FRenderAssetStreamingSettings Settings 
)

Member Function Documentation

◆ CacheStreamingMetaData()

void FStreamingRenderAsset::CacheStreamingMetaData ( )

◆ CancelStreamingRequest()

void FStreamingRenderAsset::CancelStreamingRequest ( )

◆ DropMaxResolution_Async()

int64 FStreamingRenderAsset::DropMaxResolution_Async ( int32  NumDroppedMips)

Reduce the maximum allowed resolution by 1 mip. Return the size freed by doing so.

◆ DropOneMip_Async()

int64 FStreamingRenderAsset::DropOneMip_Async ( )

Reduce BudgetedMip by 1 and return the size freed by doing so.

◆ GetDefaultExtraBoost()

static float FStreamingRenderAsset::GetDefaultExtraBoost ( bool  bUseNewMetrics)
inlinestatic

◆ GetDropMaxResMemDelta()

int64 FStreamingRenderAsset::GetDropMaxResMemDelta ( int32  NumDroppedMips) const

Return the memory delta in bytes caused by max resolution change. Actual memory reduction is smaller or equal.

◆ GetDropOneMipMemDelta()

int64 FStreamingRenderAsset::GetDropOneMipMemDelta ( ) const

Return the memory delta in bytes if a mip is successfully dropped.

◆ GetExtraBoost()

float FStreamingRenderAsset::GetExtraBoost ( TextureGroup  LODGroup,
const FRenderAssetStreamingSettings Settings 
)
static

◆ GetLODScreenSize()

float FStreamingRenderAsset::GetLODScreenSize ( int32  NumMips,
float  MaxScreenSizeOverAllViews 
) const
inline

◆ GetMaxAllowedSize()

float FStreamingRenderAsset::GetMaxAllowedSize ( float  MaxScreenSizeOverAllViews) const
inline

◆ GetNormalizedScreenSize()

float FStreamingRenderAsset::GetNormalizedScreenSize ( int32  NumMips) const
inline

◆ GetPerfectWantedMips()

FORCEINLINE int32 FStreamingRenderAsset::GetPerfectWantedMips ( ) const
inline

◆ GetSize()

int32 FStreamingRenderAsset::GetSize ( int32  InMipCount) const
inline

Returns the amount of memory used by the texture/mesh given a specified number of mip-maps, in bytes.

Parameters
MipCountNumber of mip-maps to account for
Returns
Total amount of memory used for the specified mip-maps, in bytes

◆ GetStreamingAssetTypeStr()

static const TCHAR * FStreamingRenderAsset::GetStreamingAssetTypeStr ( EStreamableRenderAssetType  InAssetType)
inlinestatic

◆ GetWantedMipsFromSize()

int32 FStreamingRenderAsset::GetWantedMipsFromSize ( float  Size,
float  InvMaxScreenSizeOverAllViews 
) const

◆ HasUpdatePending()

FORCEINLINE bool FStreamingRenderAsset::HasUpdatePending ( bool  bIsStreamingPaused,
bool  bHasViewPoint 
) const
inline

◆ IsMaxResolutionAffectedByGlobalBias()

FORCEINLINE bool FStreamingRenderAsset::IsMaxResolutionAffectedByGlobalBias ( ) const
inline

◆ IsMesh()

bool FStreamingRenderAsset::IsMesh ( ) const
inline

◆ IsMissingTooManyMips()

bool FStreamingRenderAsset::IsMissingTooManyMips ( ) const
inline

◆ IsTexture()

bool FStreamingRenderAsset::IsTexture ( ) const
inline

◆ IsVirtualTexture()

bool FStreamingRenderAsset::IsVirtualTexture ( ) const
inline

◆ KeepOneMip_Async()

int64 FStreamingRenderAsset::KeepOneMip_Async ( )

Increase BudgetedMip by 1, up to resident mips, and return the size taken.

◆ SetPerfectWantedMips_Async()

void FStreamingRenderAsset::SetPerfectWantedMips_Async ( float  MaxSize,
float  MaxSize_VisibleOnly,
float  MaxScreenSizeOverAllViews,
int32  MaxNumForcedLODs,
bool  InLooksLowRes,
const FRenderAssetStreamingSettings Settings 
)

Set the wanted mips from the async task data

◆ StreamWantedMips()

void FStreamingRenderAsset::StreamWantedMips ( FRenderAssetStreamingManager Manager)

◆ StreamWantedMipsUsingCachedData()

void FStreamingRenderAsset::StreamWantedMipsUsingCachedData ( FRenderAssetStreamingManager Manager)

◆ UpdateDynamicData()

void FStreamingRenderAsset::UpdateDynamicData ( const int32 NumStreamedMips,
int32  NumLODGroups,
const FRenderAssetStreamingSettings Settings,
bool  bWaitForMipFading,
TArray< UStreamableRenderAsset * > *  DeferredTickCBAssets = nullptr 
)

Update data that the engine could change through gameplay.

◆ UpdateLoadOrderPriority_Async()

bool FStreamingRenderAsset::UpdateLoadOrderPriority_Async ( const FRenderAssetStreamingSettings Settings)

Init load order. Return wether this texture has any load/unload request

◆ UpdateOptionalMipsState_Async()

void FStreamingRenderAsset::UpdateOptionalMipsState_Async ( )

◆ UpdateRetentionPriority_Async()

int64 FStreamingRenderAsset::UpdateRetentionPriority_Async ( bool  bPrioritizeMesh)

Init BudgetedMip and update RetentionPriority. Returns the size that would be taken if all budgeted mips where loaded.

Once the wanted mips are computed, the async task will check if everything fits in the budget. This only consider the highest mip that will be requested eventually, so that slip requests are stables.

◆ UpdateStaticData()

void FStreamingRenderAsset::UpdateStaticData ( const FRenderAssetStreamingSettings Settings)

Update data that should not change unless changing settings.

◆ UpdateStreamingStatus()

FStreamableRenderResourceState FStreamingRenderAsset::UpdateStreamingStatus ( bool  bWaitForMipFading,
TArray< UStreamableRenderAsset * > *  DeferredTickCBAssets = nullptr 
)

Lightweight version of UpdateDynamicData.

Member Data Documentation

◆ [union]

union { ... } FStreamingRenderAsset

(1) Cached memory sizes for each possible mipcount.

◆ bCachedForceFullyLoadHeuristic

uint8 FStreamingRenderAsset::bCachedForceFullyLoadHeuristic

(5)

◆ bForceFullyLoad

uint8 FStreamingRenderAsset::bForceFullyLoad

(2) Whether the texture should be forcibly fully loaded.

◆ bForceFullyLoadHeuristic

uint8 FStreamingRenderAsset::bForceFullyLoadHeuristic

(4) Same as force fully load, but takes into account component settings.

◆ bHasUpdatePending

uint8 FStreamingRenderAsset::bHasUpdatePending

(3) Wheter the streamer has streaming plans for this texture.

◆ bIgnoreStreamingMipBias

uint8 FStreamingRenderAsset::bIgnoreStreamingMipBias

(2) Whether the texture resolution should be affected by the memory budget. Only effective when forced fully resident.

◆ bIsTerrainTexture

uint8 FStreamingRenderAsset::bIsTerrainTexture

(1) Whether the texture should be forcibly fully loaded.

◆ bIsVirtualTexture

uint8 FStreamingRenderAsset::bIsVirtualTexture

(1) Whether the texture uses virtual texture streaming.

◆ bLoadWithHigherPriority

uint8 FStreamingRenderAsset::bLoadWithHigherPriority

(1) Whether the texture is loaded with higher priority.

◆ bLooksLowRes

uint8 FStreamingRenderAsset::bLooksLowRes

(4) Same as force fully load, but takes into account component settings.

◆ bMissingTooManyMips

uint8 FStreamingRenderAsset::bMissingTooManyMips

(4) Whether too many desired MIPs or LODs are missing.

◆ BoostFactor

float FStreamingRenderAsset::BoostFactor

(1) Sum of all boost factors that applies to this texture/mesh.

◆ BudgetedMips

int8 FStreamingRenderAsset::BudgetedMips

(4) The max allowed mips (based on Visible and Hidden wanted mips) in order to fit in budget.

◆ BudgetMipBias

int32 FStreamingRenderAsset::BudgetMipBias

(4) A persistent bias applied to this texture. Increase whenever the streamer needs to make sacrifices to fit in budget

◆ bUseUnkownRefHeuristic

uint8 FStreamingRenderAsset::bUseUnkownRefHeuristic

(4) Whether this has not component referencing it.

◆ CachedVisibleWantedMips

int8 FStreamingRenderAsset::CachedVisibleWantedMips

(5)

◆ CachedWantedMips

int8 FStreamingRenderAsset::CachedWantedMips

(5)

◆ CumulativeLODSizes

uint32 FStreamingRenderAsset::CumulativeLODSizes[FStreamableRenderResourceState::MAX_LOD_COUNT]

◆ CumulativeLODSizes_Mesh

uint32 FStreamingRenderAsset::CumulativeLODSizes_Mesh[FStreamableRenderResourceState::MAX_LOD_COUNT/2]

◆ DynamicBoostFactor

float FStreamingRenderAsset::DynamicBoostFactor

(3) Extra gameplay boost factor. Reset after every update.

◆ HiddenWantedMips

int8 FStreamingRenderAsset::HiddenWantedMips

(4) Wanted mips for non visible instances.

◆ InstanceRemovedTimestamp

double FStreamingRenderAsset::InstanceRemovedTimestamp

(3) If non-zero, the most recent time an instance location was removed for this texture.

◆ LastRenderTime

float FStreamingRenderAsset::LastRenderTime

(2) How much game time has elapsed since the texture was bound for rendering. Based on FApp::GetCurrentTime().

◆ LevelIndexUsage

TBitArray FStreamingRenderAsset::LevelIndexUsage

(5)

◆ LoadOrderPriority

int32 FStreamingRenderAsset::LoadOrderPriority

(4) The load request priority.

◆ LODGroup

int32 FStreamingRenderAsset::LODGroup

(1) Cached texture/mesh LOD group.

◆ LODScreenSizes

float FStreamingRenderAsset::LODScreenSizes[FStreamableRenderResourceState::MAX_LOD_COUNT/2]

◆ MaxAllowedMips

int8 FStreamingRenderAsset::MaxAllowedMips

(2) Max mip to be requested by the streaming

◆ MinAllowedMips

int8 FStreamingRenderAsset::MinAllowedMips

(2) Min mip to be requested by the streaming

◆ NoRefLODBias

int32 FStreamingRenderAsset::NoRefLODBias

(2) LOD bias applied to no-ref meshes

◆ NormalizedScreenSize

float FStreamingRenderAsset::NormalizedScreenSize

(4) Normalized screen size. Only used by meshes.

◆ NumForcedMips

int8 FStreamingRenderAsset::NumForcedMips

(4) Number of LODs forced resident. Only used by meshes currently

◆ NumMissingMips

int8 FStreamingRenderAsset::NumMissingMips

(4) How many mips are missing to satisfy ideal quality because of max size limitation. Used to prevent sacrificing mips that are already visually sacrificed.

◆ OptionalFileHash

FIoFilenameHash FStreamingRenderAsset::OptionalFileHash = INVALID_IO_FILENAME_HASH

(1) The optional mip filename hash, see FRenderAssetStreamingManager::OnPakFileChanged()

◆ OptionalMipsState

EOptionalMipsState FStreamingRenderAsset::OptionalMipsState

(2) Cached state on disk of the optional mips for this streaming texture

◆ RenderAsset

UStreamableRenderAsset* FStreamingRenderAsset::RenderAsset

(1) Texture/mesh to manage. Note that this becomes null when the texture/mesh is removed.

◆ RenderAssetType

EStreamableRenderAssetType FStreamingRenderAsset::RenderAssetType

(1)

◆ RequestedMips

int8 FStreamingRenderAsset::RequestedMips

(2) Min number of mip-maps requested by the streaming system.

◆ ResidentMips

int8 FStreamingRenderAsset::ResidentMips

(2) Cached number of mip-maps in memory (including the base mip)

◆ RetentionPriority

int32 FStreamingRenderAsset::RetentionPriority

(4) Retention priority used to sacrifice mips when out of budget.

◆ SimpleStreamableAssetManagerIndex

TSharedPtr<int32, ESPMode::ThreadSafe> FStreamingRenderAsset::SimpleStreamableAssetManagerIndex

(1) Index in SSAM. Note that the underlying index becomes INDEX_NONE when the texture/mesh is removed.

◆ VisibleWantedMips

int8 FStreamingRenderAsset::VisibleWantedMips

(4) Max wanted mips for visible instances.

◆ WantedMips

int8 FStreamingRenderAsset::WantedMips

(4) The mip that will be requested. Note, that some texture are loaded using split requests, so that the first request can be smaller than budgeted mip.


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