r.Streaming.FullyLoadUsedTextures

r.Streaming.FullyLoadUsedTextures

#Overview

name: r.Streaming.FullyLoadUsedTextures

This variable is created as a Console Variable (cvar).

It is referenced in 5 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of r.Streaming.FullyLoadUsedTextures is to control the texture streaming behavior in Unreal Engine 5. It is primarily used in the rendering system, specifically for texture streaming management.

This setting variable is utilized by the Engine’s texture streaming subsystem and the MovieRenderPipeline plugin. The main Engine module and the MovieRenderPipelineCore module rely on this variable.

The value of this variable is set in multiple places:

  1. It is initialized with a default value of 0 in the Engine’s texture streaming helpers.
  2. It can be modified through console commands or configuration files.
  3. The MovieRenderPipeline plugin may override this value when applying custom settings for movie rendering.

The associated variable CVarStreamingFullyLoadUsedTextures directly interacts with r.Streaming.FullyLoadUsedTextures. They share the same value and purpose.

Developers should be aware that:

  1. When set to a non-zero value, all used textures will be fully streamed in as fast as possible, which can impact performance and memory usage.
  2. This setting is particularly useful in scenarios where you want to ensure all textures are loaded at full quality, such as during movie rendering or in situations where texture pop-in is unacceptable.

Best practices when using this variable include:

  1. Use it judiciously, as fully loading all textures can significantly increase memory usage.
  2. Consider enabling it temporarily for specific scenarios (like movie rendering) rather than leaving it on permanently.
  3. Test the impact on performance and memory usage when enabling this setting, especially on target hardware.

Regarding the associated variable CVarStreamingFullyLoadUsedTextures:

#References in C++ code

#Callsites

This variable is referenced in the following C++ source code:

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Streaming/TextureStreamingHelpers.cpp:188

Scope: file

Source code excerpt:


TAutoConsoleVariable<int32> CVarStreamingFullyLoadUsedTextures(
	TEXT("r.Streaming.FullyLoadUsedTextures"),
	0,
	TEXT("If non-zero, all used texture will be fully streamed in as fast as possible"),
	ECVF_Default);

static TAutoConsoleVariable<int32> CVarStreamingFullyLoadMeshes(
	TEXT("r.Streaming.FullyLoadMeshes"),

#Loc: <Workspace>/Engine/Plugins/MovieScene/MovieRenderPipeline/Source/MovieRenderPipelineCore/Private/MoviePipelineGameOverrideSetting.cpp:52

Scope (from outer to inner):

file
function     void UMoviePipelineGameOverrideSetting::ApplyCVarSettings

Source code excerpt:

	case EMoviePipelineTextureStreamingMethod::FullyLoad:
		MOVIEPIPELINE_STORE_AND_OVERRIDE_CVAR_INT(PreviousFramesForFullUpdate, TEXT("r.Streaming.FramesForFullUpdate"), 0, bOverrideValues);
		MOVIEPIPELINE_STORE_AND_OVERRIDE_CVAR_INT(PreviousFullyLoadUsedTextures, TEXT("r.Streaming.FullyLoadUsedTextures"), 1, bOverrideValues);
		break;
	case EMoviePipelineTextureStreamingMethod::Disabled:
		MOVIEPIPELINE_STORE_AND_OVERRIDE_CVAR_INT(PreviousTextureStreaming, TEXT("r.TextureStreaming"), 0, bOverrideValues);
		break;
	default:
		// We don't change their texture streaming settings.

#Loc: <Workspace>/Engine/Plugins/MovieScene/MovieRenderPipeline/Source/MovieRenderPipelineCore/Private/MoviePipelineGameOverrideSetting.cpp:178

Scope (from outer to inner):

file
function     void UMoviePipelineGameOverrideSetting::BuildNewProcessCommandLineArgsImpl

Source code excerpt:

	case EMoviePipelineTextureStreamingMethod::FullyLoad:
		InOutDeviceProfileCvars.Add(TEXT("r.Streaming.FramesForFullUpdate=0"));
		InOutDeviceProfileCvars.Add(TEXT("r.Streaming.FullyLoadUsedTextures=1"));
		break;
	case EMoviePipelineTextureStreamingMethod::Disabled:
		InOutDeviceProfileCvars.Add(TEXT("r.TextureStreaming=0"));
		break;
	default:
		// We don't change their texture streaming settings.

#Associated Variable and Callsites

This variable is associated with another variable named CVarStreamingFullyLoadUsedTextures. They share the same value. See the following C++ source code.

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Streaming/TextureStreamingHelpers.cpp:187

Scope: file

Source code excerpt:



TAutoConsoleVariable<int32> CVarStreamingFullyLoadUsedTextures(
	TEXT("r.Streaming.FullyLoadUsedTextures"),
	0,
	TEXT("If non-zero, all used texture will be fully streamed in as fast as possible"),
	ECVF_Default);

static TAutoConsoleVariable<int32> CVarStreamingFullyLoadMeshes(

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Streaming/TextureStreamingHelpers.cpp:316

Scope (from outer to inner):

file
function     void FRenderAssetStreamingSettings::Update

Source code excerpt:

	bUseNewMetrics = CVarStreamingUseNewMetrics.GetValueOnAnyThread() != 0;
	bLimitPoolSizeToVRAM = !GIsEditor && CVarStreamingLimitPoolSizeToVRAM.GetValueOnAnyThread() != 0;
	bFullyLoadUsedTextures = CVarStreamingFullyLoadUsedTextures.GetValueOnAnyThread() != 0;
	bFullyLoadMeshes = CVarStreamingFullyLoadMeshes.GetValueOnAnyThread() != 0;
	bUseAllMips = CVarStreamingUseAllMips.GetValueOnAnyThread() != 0;
	MinMipForSplitRequest = CVarStreamingMinMipForSplitRequest.GetValueOnAnyThread();
	PerTextureBiasViewBoostThreshold = CVarStreamingPerTextureBiasViewBoostThreshold.GetValueOnAnyThread();
	MaxHiddenPrimitiveViewBoost = FMath::Max<float>(1.f, CVarStreamingMaxHiddenPrimitiveViewBoost.GetValueOnAnyThread());
	MinLevelRenderAssetScreenSize = CVarStreamingMinLevelRenderAssetScreenSize.GetValueOnAnyThread();