r.LumenScene.SurfaceCache.FarField.CardTexelDensity

r.LumenScene.SurfaceCache.FarField.CardTexelDensity

#Overview

name: r.LumenScene.SurfaceCache.FarField.CardTexelDensity

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

It is referenced in 3 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of r.LumenScene.SurfaceCache.FarField.CardTexelDensity is to control the texel density of far-field Lumen cards in the scene surface cache. It defines the number of texels per world space unit for far-field Lumen cards, which are used in the Lumen global illumination system.

This setting variable is primarily used by the Lumen rendering system, which is part of Unreal Engine’s advanced lighting and global illumination features. It’s specifically related to the far-field calculations in the Lumen Scene Surface Cache.

The value of this variable is set through a console variable (CVar) system. It’s initialized with a default value of 0.001f, meaning 0.001 texels per world space unit for far-field Lumen cards.

The associated variable CVarLumenSceneFarFieldTexelDensity directly interacts with this setting. It’s the C++ representation of the console variable and is used to access the value within the engine’s code.

Developers should be aware that this variable affects the detail level and performance of far-field global illumination calculations. A higher value will increase the detail of far-field lighting but may also increase memory usage and computational cost.

Best practices when using this variable include:

  1. Adjusting it based on the scale and detail requirements of your scene.
  2. Balancing it with other Lumen settings for optimal performance and visual quality.
  3. Testing different values to find the best trade-off between visual quality and performance for your specific project.

Regarding the associated variable CVarLumenSceneFarFieldTexelDensity:

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenSceneGPUDrivenUpdate.cpp:20

Scope: file

Source code excerpt:


static TAutoConsoleVariable<float> CVarLumenSceneFarFieldTexelDensity(
	TEXT("r.LumenScene.SurfaceCache.FarField.CardTexelDensity"),
	0.001f,
	TEXT("Far Field Lumen card texels per world space unit"),
	ECVF_Scalability | ECVF_RenderThreadSafe
);

static TAutoConsoleVariable<float> CVarLumenSceneFarFieldDistance(

#Associated Variable and Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenSceneGPUDrivenUpdate.cpp:19

Scope: file

Source code excerpt:

);

static TAutoConsoleVariable<float> CVarLumenSceneFarFieldTexelDensity(
	TEXT("r.LumenScene.SurfaceCache.FarField.CardTexelDensity"),
	0.001f,
	TEXT("Far Field Lumen card texels per world space unit"),
	ECVF_Scalability | ECVF_RenderThreadSafe
);

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenSceneGPUDrivenUpdate.cpp:86

Scope (from outer to inner):

file
function     float LumenScene::GetFarFieldCardTexelDensity

Source code excerpt:

float LumenScene::GetFarFieldCardTexelDensity()
{
	return CVarLumenSceneFarFieldTexelDensity.GetValueOnRenderThread();
}

float LumenScene::GetFarFieldCardMaxDistance()
{
	return CVarLumenSceneFarFieldDistance.GetValueOnRenderThread();
}