vr.PixelDensity

vr.PixelDensity

#Overview

name: vr.PixelDensity

This variable is created as a Console Variable (cvar).

It is referenced in 2 C++ source files.

#Summary

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Plugins/Runtime/XRBase/Source/XRBase/Private/HeadMountedDisplayConsoleCommands.cpp:30

Scope: file

Source code excerpt:


static TAutoConsoleVariable<float> CVarPixelDensity(
	TEXT("vr.PixelDensity"),
	1.0f,
	TEXT("Pixel density sets the VR render target texture size as a factor of recommended texture size.\n")
	TEXT("The recommended texture size is the size that will result in no under sampling in most distorted area of the view when computing the final image to be displayed on the device by the runtime compositor.\n")
	TEXT("Note that the recommended texture size will likely be larger than the display panel resolution of the device as the texture is used as input data for the final composition/lens distortion pass provided by the device's runtime.\n")
	TEXT("A pixel density of 1.0 (default) will use the device's recommended texture size.\n"),
	ECVF_Scalability | ECVF_Default);

#Loc: <Workspace>/Engine/Plugins/Runtime/XRBase/Source/XRBase/Private/HeadMountedDisplayBase.cpp:164

Scope (from outer to inner):

file
function     void FHeadMountedDisplayBase::CVarSinkHandler

Source code excerpt:

	if (GEngine && GEngine->XRSystem.IsValid())
	{
		static const auto PixelDensityCVar = IConsoleManager::Get().FindConsoleVariable(TEXT("vr.PixelDensity"));
		IHeadMountedDisplay* const HMDDevice = GEngine->XRSystem->GetHMDDevice();
		if (HMDDevice && PixelDensityCVar)
		{
			float NewPixelDensity = PixelDensityCVar->GetFloat();
			if (NewPixelDensity < PixelDensityMin || NewPixelDensity > PixelDensityMax)
			{