r.SceneCapture.OrthographicNumYTiles

r.SceneCapture.OrthographicNumYTiles

#Overview

name: r.SceneCapture.OrthographicNumYTiles

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.SceneCapture.OrthographicNumYTiles is to control the number of Y tiles to render in orthographic scene captures. This setting is specifically for the rendering system, particularly for scene capture components.

This setting variable is primarily used by the Engine module, specifically within the SceneCaptureComponent subsystem. It’s referenced in the SceneCaptureComponent.cpp file, which is part of the core rendering functionality in Unreal Engine.

The value of this variable is set using a console variable (CVar) system. It’s initialized with a default value of 4, but can be changed at runtime through console commands or configuration files.

The associated variable CVarSCOrthographicNumYTiles directly interacts with r.SceneCapture.OrthographicNumYTiles. They share the same value and purpose.

Developers must be aware of several important points when using this variable:

  1. It only works in Orthographic mode, not in Perspective mode.
  2. It’s only effective when r.SceneCapture.OverrideOrthographicTilingValues is enabled.
  3. The value is clamped between 1 and 64 in the GetNumYTiles() function.

Best practices for using this variable include:

  1. Only modify it when you specifically need to adjust the tiling of orthographic scene captures.
  2. Be mindful of performance implications when increasing the number of tiles.
  3. Ensure r.SceneCapture.OverrideOrthographicTilingValues is enabled if you want this setting to take effect.
  4. Consider the balance between quality and performance when adjusting this value.

Regarding the associated variable CVarSCOrthographicNumYTiles:

When working with either variable, it’s important to understand their impact on rendering performance and quality, especially in scenarios involving orthographic scene captures.

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Components/SceneCaptureComponent.cpp:64

Scope: file

Source code excerpt:


static TAutoConsoleVariable<int32> CVarSCOrthographicNumYTiles(
	TEXT("r.SceneCapture.OrthographicNumYTiles"),
	4,
	TEXT("Number of Y tiles to render. Ignored in Perspective mode, works only in Orthographic mode and when r.SceneCapture.OverrideOrthographicTilingValues is on."),
	ECVF_Scalability);

static TAutoConsoleVariable<bool> CVarSCCullByDetailMode(
	TEXT("r.SceneCapture.CullByDetailMode"),

#Associated Variable and Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Components/SceneCaptureComponent.cpp:63

Scope: file

Source code excerpt:

	ECVF_Scalability);

static TAutoConsoleVariable<int32> CVarSCOrthographicNumYTiles(
	TEXT("r.SceneCapture.OrthographicNumYTiles"),
	4,
	TEXT("Number of Y tiles to render. Ignored in Perspective mode, works only in Orthographic mode and when r.SceneCapture.OverrideOrthographicTilingValues is on."),
	ECVF_Scalability);

static TAutoConsoleVariable<bool> CVarSCCullByDetailMode(

#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Components/SceneCaptureComponent.cpp:913

Scope (from outer to inner):

file
function     int32 USceneCaptureComponent2D::GetNumYTiles

Source code excerpt:

	}

	int32 NumYTilesLocal = CVarSCOrthographicNumYTiles->GetInt();
	return FMath::Clamp(NumYTilesLocal, 1, 64);
}

// -----------------------------------------------

APlanarReflection::APlanarReflection(const FObjectInitializer& ObjectInitializer)