r.HeterogeneousVolumes.VolumeResolution.Y

r.HeterogeneousVolumes.VolumeResolution.Y

#Overview

name: r.HeterogeneousVolumes.VolumeResolution.Y

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.HeterogeneousVolumes.VolumeResolution.Y is to override the preshading and lighting volume resolution in the Y dimension for heterogeneous volumes in Unreal Engine’s rendering system.

This setting variable is primarily used in the Renderer module, specifically within the HeterogeneousVolumes subsystem. It’s part of the rendering pipeline that handles volumetric effects and lighting.

The value of this variable is set through a console variable (CVar) system. It’s defined as a TAutoConsoleVariable with an initial value of 0.

The associated variable CVarHeterogeneousVolumesPreshadingVolumeResolutionY directly interacts with it, as they share the same value and purpose.

Developers must be aware that:

  1. A value of 0 means the override is disabled, and the engine will use the per-volume attribute instead.
  2. Any positive value will override the resolution in the Y dimension.
  3. This setting is render thread safe, meaning it can be changed at runtime without causing threading issues.

Best practices when using this variable include:

  1. Only override the resolution when necessary, as it may impact performance.
  2. Consider the impact on memory usage when increasing the resolution.
  3. Ensure that changes to this variable are coordinated with the X and Z dimension settings for consistent results.

Regarding the associated variable CVarHeterogeneousVolumesPreshadingVolumeResolutionY:

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/HeterogeneousVolumes/HeterogeneousVolumes.cpp:123

Scope: file

Source code excerpt:


static TAutoConsoleVariable<int32> CVarHeterogeneousVolumesPreshadingVolumeResolutionY(
	TEXT("r.HeterogeneousVolumes.VolumeResolution.Y"),
	0,
	TEXT("Overrides the preshading and lighting volume resolution in X (Default = 0)")
	TEXT("0: Disabled, uses per-volume attribute\n")
	TEXT(">0: Overrides resolution in Y\n"),
	ECVF_RenderThreadSafe
);

#Associated Variable and Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/HeterogeneousVolumes/HeterogeneousVolumes.cpp:122

Scope: file

Source code excerpt:

);

static TAutoConsoleVariable<int32> CVarHeterogeneousVolumesPreshadingVolumeResolutionY(
	TEXT("r.HeterogeneousVolumes.VolumeResolution.Y"),
	0,
	TEXT("Overrides the preshading and lighting volume resolution in X (Default = 0)")
	TEXT("0: Disabled, uses per-volume attribute\n")
	TEXT(">0: Overrides resolution in Y\n"),
	ECVF_RenderThreadSafe

#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/HeterogeneousVolumes/HeterogeneousVolumes.cpp:373

Scope (from outer to inner):

file
namespace    HeterogeneousVolumes
function     FIntVector GetVolumeResolution

Source code excerpt:

		FIntVector OverrideVolumeResolution = FIntVector(
			CVarHeterogeneousVolumesPreshadingVolumeResolutionX.GetValueOnRenderThread(),
			CVarHeterogeneousVolumesPreshadingVolumeResolutionY.GetValueOnRenderThread(),
			CVarHeterogeneousVolumesPreshadingVolumeResolutionZ.GetValueOnRenderThread());

		VolumeResolution.X = OverrideVolumeResolution.X > 0 ? OverrideVolumeResolution.X : VolumeResolution.X;
		VolumeResolution.Y = OverrideVolumeResolution.Y > 0 ? OverrideVolumeResolution.Y : VolumeResolution.Y;
		VolumeResolution.Z = OverrideVolumeResolution.Z > 0 ? OverrideVolumeResolution.Z : VolumeResolution.Z;