r.SceneCapture.OrthographicNumXTiles
r.SceneCapture.OrthographicNumXTiles
#Overview
name: r.SceneCapture.OrthographicNumXTiles
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Number of X tiles to render. Ignored in Perspective mode, works only in Orthographic mode and when r.SceneCapture.OverrideOrthographicTilingValues is on.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.SceneCapture.OrthographicNumXTiles is to control the number of X tiles to render in orthographic scene captures. This setting is specific to the scene capture system within Unreal Engine’s rendering pipeline.
This setting variable is primarily used by the Engine module, specifically within the SceneCaptureComponent subsystem. It’s referenced in the SceneCaptureComponent.cpp file, which handles scene capture functionality.
The value of this variable is set through a console variable (CVarSCOrthographicNumXTiles) with a default value of 4. It can be modified at runtime through console commands or programmatically.
This variable interacts closely with several other variables:
- r.SceneCapture.OrthographicNumYTiles: Controls the number of Y tiles.
- r.SceneCapture.OverrideOrthographicTilingValues: Determines whether the tiling values should be overridden.
Developers must be aware of the following when using this variable:
- It only works in Orthographic mode, not in Perspective mode.
- It’s only effective when r.SceneCapture.OverrideOrthographicTilingValues is enabled.
- The value is clamped between 1 and 64 in the GetNumXTiles() function.
Best practices for using this variable include:
- Use it in conjunction with r.SceneCapture.OrthographicNumYTiles for consistent tiling.
- Be mindful of performance implications when increasing the number of tiles.
- Ensure r.SceneCapture.OverrideOrthographicTilingValues is set appropriately.
Regarding the associated variable CVarSCOrthographicNumXTiles:
The purpose of CVarSCOrthographicNumXTiles is to provide a programmatic interface to the r.SceneCapture.OrthographicNumXTiles setting. It’s an instance of TAutoConsoleVariable
This variable is used within the Engine module, specifically in the SceneCaptureComponent2D class. It’s defined and used in the SceneCaptureComponent.cpp file.
The value of CVarSCOrthographicNumXTiles is set when it’s initialized, with a default value of 4. It can be modified through console commands or programmatically at runtime.
CVarSCOrthographicNumXTiles directly corresponds to the r.SceneCapture.OrthographicNumXTiles setting. It’s used in the GetNumXTiles() function of the USceneCaptureComponent2D class to retrieve the current value.
Developers should be aware that:
- Changes to this variable will affect all orthographic scene captures.
- The value is clamped between 1 and 64 when used in GetNumXTiles().
Best practices for using CVarSCOrthographicNumXTiles include:
- Use the GetInt() method to retrieve the current value.
- Consider performance implications when modifying the value.
- Ensure any modifications are thread-safe if accessed from multiple threads.
#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:58
Scope: file
Source code excerpt:
static TAutoConsoleVariable<int32> CVarSCOrthographicNumXTiles(
TEXT("r.SceneCapture.OrthographicNumXTiles"),
4,
TEXT("Number of X tiles to render. Ignored in Perspective mode, works only in Orthographic mode and when r.SceneCapture.OverrideOrthographicTilingValues is on."),
ECVF_Scalability);
static TAutoConsoleVariable<int32> CVarSCOrthographicNumYTiles(
TEXT("r.SceneCapture.OrthographicNumYTiles"),
#Associated Variable and Callsites
This variable is associated with another variable named CVarSCOrthographicNumXTiles
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Components/SceneCaptureComponent.cpp:57
Scope: file
Source code excerpt:
ECVF_Scalability);
static TAutoConsoleVariable<int32> CVarSCOrthographicNumXTiles(
TEXT("r.SceneCapture.OrthographicNumXTiles"),
4,
TEXT("Number of X tiles to render. Ignored in Perspective mode, works only in Orthographic mode and when r.SceneCapture.OverrideOrthographicTilingValues is on."),
ECVF_Scalability);
static TAutoConsoleVariable<int32> CVarSCOrthographicNumYTiles(
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Components/SceneCaptureComponent.cpp:902
Scope (from outer to inner):
file
function int32 USceneCaptureComponent2D::GetNumXTiles
Source code excerpt:
}
int32 NumXTilesLocal = CVarSCOrthographicNumXTiles->GetInt();
return FMath::Clamp(NumXTilesLocal, 1, 64);
}
int32 USceneCaptureComponent2D::GetNumYTiles() const
{
if (!CVarSCOverrideOrthographicTilingValues->GetBool())