r.LumenScene.UploadEveryFrame

r.LumenScene.UploadEveryFrame

#Overview

name: r.LumenScene.UploadEveryFrame

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

It is referenced in 7 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of r.LumenScene.UploadEveryFrame is to control whether the entire Lumen Scene’s data should be uploaded every frame. This setting is primarily used for debugging purposes in the Lumen lighting system of Unreal Engine 5.

Regarding the associated variable GLumenSceneUploadEveryFrame:

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenScene.cpp:54

Scope: file

Source code excerpt:

int32 GLumenSceneUploadEveryFrame = 0;
FAutoConsoleVariableRef CVarLumenSceneUploadEveryFrame(
	TEXT("r.LumenScene.UploadEveryFrame"),
	GLumenSceneUploadEveryFrame,
	TEXT("Whether to upload the entire Lumen Scene's data every frame. Useful for debugging."),
	ECVF_RenderThreadSafe
);

TAutoConsoleVariable<int32> CVarLumenSceneUpdateViewOrigin(

#Associated Variable and Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenMeshCards.cpp:122

Scope: file

Source code excerpt:

);

extern int32 GLumenSceneUploadEveryFrame;

namespace LumenMeshCards
{
	FVector3f GetAxisAlignedDirection(uint32 AxisAlignedDirectionIndex);
};

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenMeshCards.cpp:297

Scope (from outer to inner):

file
function     void UpdateLumenMeshCards

Source code excerpt:

	QUICK_SCOPE_CYCLE_COUNTER(UpdateLumenMeshCards);

	extern int32 GLumenSceneUploadEveryFrame;
	if (GLumenSceneUploadEveryFrame)
	{
		LumenSceneData.HeightfieldIndicesToUpdateInBuffer.Reset();
		for (int32 i = 0; i < LumenSceneData.Heightfields.Num(); ++i)
		{
			LumenSceneData.HeightfieldIndicesToUpdateInBuffer.Add(i);
		}

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenMeshCards.cpp:423

Scope (from outer to inner):

file
function     void UpdateLumenMeshCards

Source code excerpt:

		QUICK_SCOPE_CYCLE_COUNTER(UpdateSceneInstanceIndexToMeshCardsIndexBuffer);

		if (GLumenSceneUploadEveryFrame)
		{
			LumenSceneData.PrimitivesToUpdateMeshCards.Reset();

			for (int32 PrimitiveIndex = 0; PrimitiveIndex < Scene.Primitives.Num(); ++PrimitiveIndex)
			{
				LumenSceneData.PrimitivesToUpdateMeshCards.Add(PrimitiveIndex);

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenMeshCards.cpp:503

Scope (from outer to inner):

file
function     void Lumen::UpdateCardSceneBuffer

Source code excerpt:

		}

		if (GLumenSceneUploadEveryFrame)
		{
			LumenSceneData.CardIndicesToUpdateInBuffer.Reset();

			for (int32 i = 0; i < LumenSceneData.Cards.Num(); i++)
			{
				LumenSceneData.CardIndicesToUpdateInBuffer.Add(i);

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenScene.cpp:52

Scope: file

Source code excerpt:

);

int32 GLumenSceneUploadEveryFrame = 0;
FAutoConsoleVariableRef CVarLumenSceneUploadEveryFrame(
	TEXT("r.LumenScene.UploadEveryFrame"),
	GLumenSceneUploadEveryFrame,
	TEXT("Whether to upload the entire Lumen Scene's data every frame. Useful for debugging."),
	ECVF_RenderThreadSafe
);

TAutoConsoleVariable<int32> CVarLumenSceneUpdateViewOrigin(
	TEXT("r.LumenScene.UpdateViewOrigin"),

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenScene.cpp:424

Scope (from outer to inner):

file
function     void FLumenSceneData::UploadPageTable

Source code excerpt:

	RDG_GPU_MASK_SCOPE(GraphBuilder, FRHIGPUMask::All());

	if (GLumenSceneUploadEveryFrame != 0)
	{
		PageTableIndicesToUpdateInBuffer.SetNum(PageTable.Num());

		for (int32 PageIndex = 0; PageIndex < PageTable.Num(); ++PageIndex)
		{
			PageTableIndicesToUpdateInBuffer[PageIndex] = PageIndex;