reckfellENGINE

TextureStreaming

Manages dynamic texture mipmap streaming to optimize VRAM usage.

On this page
class TextureStreamingReckfellSharp

Manages dynamic texture mipmap streaming to optimize VRAM usage.

The TextureStreaming singleton manages dynamic loading and unloading of texture mipmap levels based on what is visible in the current frame. This allows projects with many large textures to significantly reduce VRAM usage while maintaining visual quality for visible textures. Texture streaming works by analyzing shader feedback to determine which textures are actively being used and at what resolution they're being displayed. Textures that are far from the camera or not currently visible have their higher-resolution mipmap levels unloaded, while textures being displayed up close are loaded at higher resolutions. The system includes a memory budget feature that automatically manages texture resolutions to stay within a specified VRAM limit. When the budget is exceeded, the system prioritizes textures based on how recently they were used and how much screen space they occupy. Note: Texture streaming must be enabled in the Project Settings (ProjectSettings.rendering/textures/streaming/enabled) and textures must be imported with streaming support to use this feature.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Properties4

MaxLodOverrideProperty
# MaxLodOverride
C#
public static int MaxLodOverride { get; set; }

Overrides the maximum LOD (mipmap level) that can be loaded for streamed textures at runtime. Lower values allow higher resolution textures. Valid values are 0 (full resolution) to 13 (lowest resolution). Values outside that range clear the override and use the default from ProjectSettings.rendering/textures/streaming/max_lod; when no override is active this property returns -1.

MemoryBudgetMbOverrideProperty
# MemoryBudgetMbOverride
C#
public static uint MemoryBudgetMbOverride { get; set; }

Overrides the memory budget for streamed textures at runtime (in megabytes). When the budget is exceeded, the system reduces texture resolution to stay within the limit. A value of UINT32_MAX (4294967295, the maximum unsigned 32-bit integer) disables the override and uses the default from ProjectSettings.rendering/textures/streaming/memory_budget_mb.

MinLodOverrideProperty
# MinLodOverride
C#
public static int MinLodOverride { get; set; }

Overrides the minimum LOD (mipmap level) that textures start at when loaded. Higher values result in lower initial resolution. Valid values are 0 (full resolution) to 13 (lowest resolution). Values outside that range clear the override and use the default from ProjectSettings.rendering/textures/streaming/min_lod; when no override is active this property returns -1.

SingletonProperty
# Singleton
C#
public static TextureStreamingInstance Singleton { get; }

Methods8

FlushTextureStreamingvoid
# FlushTextureStreaming
C#
public static void FlushTextureStreaming();

Forces all currently queued texture streaming operations to complete immediately, bypassing the normal gradual transition and I/O throttling. This immediately loads or unloads mipmap levels to reach the target resolution for all managed textures, then emits the TextureStreaming.FlushCompleted signal. Useful during loading screens or when teleporting the player to ensure all textures are at their optimal resolution without a visible transition.

GetMaxLodOverrideint
# GetMaxLodOverride
C#
public static int GetMaxLodOverride();
Returns int
GetMemoryBudgetBytesUsedulong
# GetMemoryBudgetBytesUsed
C#
public static ulong GetMemoryBudgetBytesUsed();

Returns the current VRAM usage of streamed textures in bytes. This represents the total memory consumed by all streamed textures at their currently loaded mipmap levels.

Returns ulong
GetMemoryBudgetMbOverrideuint
# GetMemoryBudgetMbOverride
C#
public static uint GetMemoryBudgetMbOverride();
Returns uint
GetMinLodOverrideint
# GetMinLodOverride
C#
public static int GetMinLodOverride();
Returns int
SetMaxLodOverridevoid
# SetMaxLodOverride
C#
public static void SetMaxLodOverride(int maxLod);
Parameters
NameTypeDefault
maxLodint—
SetMemoryBudgetMbOverridevoid
# SetMemoryBudgetMbOverride
C#
public static void SetMemoryBudgetMbOverride(uint mb);
Parameters
NameTypeDefault
mbuint—
SetMinLodOverridevoid
# SetMinLodOverride
C#
public static void SetMinLodOverride(int minLod);
Parameters
NameTypeDefault
minLodint—

Signals and events1

FlushCompletedEvent
# FlushCompleted
C#
public static event Action FlushCompleted;

Emitted when a texture streaming flush operation finishes, after TextureStreaming.FlushTextureStreaming has been called and all managed textures have reached their target resolutions.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.