r.Test.CameraCut
r.Test.CameraCut
#Overview
name: r.Test.CameraCut
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Force enabling camera cut for testing purposes.\n 0: disabled (default); 1: enabled.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.Test.CameraCut is to force enable camera cut for testing purposes in Unreal Engine 5’s rendering system.
This setting variable is primarily used in the Renderer module of Unreal Engine, specifically within the scene rendering subsystem. It’s defined in the SceneRendering.cpp file, which is a core part of the rendering pipeline.
The value of this variable is set through a console command. It’s initialized with a default value of 0 (disabled) and can be toggled to 1 (enabled) via the console.
The associated variable CVarTestCameraCut directly interacts with r.Test.CameraCut. They share the same value and purpose.
Developers must be aware that this variable is intended for testing purposes only. It forcibly enables camera cuts, which might interfere with normal rendering behavior. It’s important to note that this variable is only checked in non-shipping builds (#if !UE_BUILD_SHIPPING), meaning it won’t affect release builds.
Best practices when using this variable include:
- Only use it for testing and debugging purposes.
- Remember to disable it after testing to avoid unintended camera cuts in your scene.
- Be aware that it might interact with other camera-related systems in your game.
Regarding the associated variable CVarTestCameraCut:
The purpose of CVarTestCameraCut is the same as r.Test.CameraCut - to force enable camera cut for testing purposes.
It’s used in the same Renderer module and scene rendering subsystem as r.Test.CameraCut.
The value is set when the TAutoConsoleVariable is initialized, and it can be modified through console commands.
CVarTestCameraCut directly interacts with the r.Test.CameraCut console variable, as they represent the same setting.
Developers should be aware that this is an internal variable used to implement the console command functionality. It’s not intended to be accessed directly in most cases.
Best practices for CVarTestCameraCut are the same as for r.Test.CameraCut, as they are essentially two representations of the same setting. Use it only for testing, disable after use, and be aware of potential interactions with other camera systems.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/SceneRendering.cpp:390
Scope: file
Source code excerpt:
static TAutoConsoleVariable<int32> CVarTestCameraCut(
TEXT("r.Test.CameraCut"),
0,
TEXT("Force enabling camera cut for testing purposes.\n")
TEXT(" 0: disabled (default); 1: enabled."));
static TAutoConsoleVariable<int32> CVarTestScreenPercentageInterface(
TEXT("r.Test.DynamicResolutionHell"),
#Associated Variable and Callsites
This variable is associated with another variable named CVarTestCameraCut
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/SceneRendering.cpp:389
Scope: file
Source code excerpt:
TEXT(" 0: disabled (default);"));
static TAutoConsoleVariable<int32> CVarTestCameraCut(
TEXT("r.Test.CameraCut"),
0,
TEXT("Force enabling camera cut for testing purposes.\n")
TEXT(" 0: disabled (default); 1: enabled."));
static TAutoConsoleVariable<int32> CVarTestScreenPercentageInterface(
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/SceneRendering.cpp:2642
Scope (from outer to inner):
file
function FSceneRenderer::FSceneRenderer
Source code excerpt:
#if !UE_BUILD_SHIPPING
if (CVarTestCameraCut.GetValueOnGameThread())
{
ViewInfo->bCameraCut = true;
}
#endif
#if WITH_DUMPGPU