r.Substrate.Glints.LUT

r.Substrate.Glints.LUT

#Overview

name: r.Substrate.Glints.LUT

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.Substrate.Glints.LUT is to select one of the glint rendering Look-Up Tables (LUTs) for testing purposes in Unreal Engine 5’s rendering system.

This setting variable is primarily used in the rendering subsystem of Unreal Engine 5, specifically in the Substrate module, which is responsible for advanced material rendering techniques.

The value of this variable is set through a console variable (CVar) named CVarSubstrateGlintsLUT. It is initialized with a default value of 1 and can be modified at runtime.

The associated variable CVarSubstrateGlintsLUT interacts directly with r.Substrate.Glints.LUT, as they share the same value. This variable is used in the Substrate namespace to determine the GlintLUTIndex.

Developers must be aware that this variable is intended for testing purposes, as indicated in its description. It affects the selection of the glint rendering LUT, which can impact the visual appearance of materials that use glints.

Best practices when using this variable include:

  1. Use it primarily for testing and debugging glint rendering.
  2. Be cautious when modifying its value in production environments, as it may affect performance or visual quality.
  3. Consider the impact on different hardware configurations when changing this value.

Regarding the associated variable CVarSubstrateGlintsLUT:

Developers should be aware that changes to CVarSubstrateGlintsLUT will directly affect the behavior of the Substrate::GlintLUTIndex() function, potentially impacting glint rendering across the entire engine where this function is used.

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/RenderCore/Private/RenderUtils.cpp:1801

Scope: file

Source code excerpt:


static TAutoConsoleVariable<int32> CVarSubstrateGlintsLUT(
	TEXT("r.Substrate.Glints.LUT"),
	1,
	TEXT("Select one of the glint rendering LUT for testing."),
	ECVF_RenderThreadSafe);

static TAutoConsoleVariable<float> CVarSubstrateGlintsLevelBias(
	TEXT("r.Substrate.Glints.LevelBias"),

#Associated Variable and Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/RenderCore/Private/RenderUtils.cpp:1800

Scope: file

Source code excerpt:

	ECVF_ReadOnly | ECVF_RenderThreadSafe);

static TAutoConsoleVariable<int32> CVarSubstrateGlintsLUT(
	TEXT("r.Substrate.Glints.LUT"),
	1,
	TEXT("Select one of the glint rendering LUT for testing."),
	ECVF_RenderThreadSafe);

static TAutoConsoleVariable<float> CVarSubstrateGlintsLevelBias(

#Loc: <Workspace>/Engine/Source/Runtime/RenderCore/Private/RenderUtils.cpp:1937

Scope (from outer to inner):

file
namespace    Substrate
function     uint32 GlintLUTIndex

Source code excerpt:

	uint32 GlintLUTIndex()
	{
		return CVarSubstrateGlintsLUT.GetValueOnAnyThread()<= 0 ? 0u : 1u;
	}

	float GlintLevelBias()
	{
		return CVarSubstrateGlintsLevelBias.GetValueOnAnyThread();
	}