r.Test.SecondaryUpscaleOverride

r.Test.SecondaryUpscaleOverride

#Overview

name: r.Test.SecondaryUpscaleOverride

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.Test.SecondaryUpscaleOverride is to provide a testing mechanism for overriding the secondary upscale in Unreal Engine’s rendering system.

Regarding the associated variable CVarTestSecondaryUpscaleOverride:

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/SceneRendering.cpp:412

Scope: file

Source code excerpt:


static TAutoConsoleVariable<int32> CVarTestSecondaryUpscaleOverride(
	TEXT("r.Test.SecondaryUpscaleOverride"),
	0,
	TEXT("Override the secondary upscale.\n")
	TEXT(" 0: disabled; (default)\n")
	TEXT(" 1: use secondary view fraction = 0.5 with nearest secondary upscale."));

#endif

#Associated Variable and Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/SceneRendering.cpp:411

Scope: file

Source code excerpt:

	TEXT(" 2: TemporalAA upsample."));

static TAutoConsoleVariable<int32> CVarTestSecondaryUpscaleOverride(
	TEXT("r.Test.SecondaryUpscaleOverride"),
	0,
	TEXT("Override the secondary upscale.\n")
	TEXT(" 0: disabled; (default)\n")
	TEXT(" 1: use secondary view fraction = 0.5 with nearest secondary upscale."));

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/SceneRendering.cpp:2795

Scope (from outer to inner):

file
function     FSceneRenderer::FSceneRenderer

Source code excerpt:


	// Override secondary screen percentage for testing purpose.
	if (CVarTestSecondaryUpscaleOverride.GetValueOnGameThread() > 0 && !ViewFamily.Views[0]->bIsReflectionCapture)
	{
		ViewFamily.SecondaryViewFraction = 1.0 / float(CVarTestSecondaryUpscaleOverride.GetValueOnGameThread());
		ViewFamily.SecondaryScreenPercentageMethod = ESecondaryScreenPercentageMethod::NearestSpatialUpscale;
	}
#endif

	// If any viewpoint has been locked, set time to zero to avoid time-based
	// rendering differences in materials.