remote.arcameraqcgpucompressed

remote.arcameraqcgpucompressed

#Overview

name: remote.arcameraqcgpucompressed

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 remote.arcameraqcgpucompressed is to control the compression method for AR camera images in the Remote Session plugin. It determines whether the compression should be performed on the GPU or CPU.

This setting variable is primarily used by the Remote Session plugin, specifically within the AR Camera Channel module. Based on the callsites, it’s part of the RemoteSessionARCameraChannel functionality.

The value of this variable is set using a TAutoConsoleVariable, which means it can be changed at runtime through console commands. By default, it’s set to 1, indicating GPU compression.

The associated variable CVarJPEGGpu directly interacts with remote.arcameraqcgpucompressed. They share the same value and purpose.

Developers must be aware that:

  1. This variable affects performance and image quality in remote AR camera sessions.
  2. Changing this value may impact the resource usage (GPU vs CPU) of the application.

Best practices when using this variable include:

  1. Consider the target device capabilities when deciding between GPU and CPU compression.
  2. Test performance with both settings to determine the optimal configuration for your specific use case.
  3. Be mindful of the potential impact on frame rates and image quality when switching between GPU and CPU compression.

Regarding the associated variable CVarJPEGGpu:

Developers should be aware that changing CVarJPEGGpu will have the same effect as changing remote.arcameraqcgpucompressed, and they should follow the same best practices mentioned earlier when working with this variable.

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Plugins/Experimental/RemoteSession/Source/RemoteSession/Private/Channels/RemoteSessionARCameraChannel.cpp:46

Scope: file

Source code excerpt:


TAutoConsoleVariable<int32> CVarJPEGGpu(
	TEXT("remote.arcameraqcgpucompressed"),
	1,
	TEXT("1 (default) compresses on the GPU, 0 on the CPU"),
	ECVF_Default);

BEGIN_SHADER_PARAMETER_STRUCT(FRemoteSessionARCameraMaterialParameters, )
	SHADER_PARAMETER_STRUCT(FScreenPassTextureViewportParameters, PostProcessOutput)

#Associated Variable and Callsites

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

#Loc: <Workspace>/Engine/Plugins/Experimental/RemoteSession/Source/RemoteSession/Private/Channels/RemoteSessionARCameraChannel.cpp:45

Scope: file

Source code excerpt:

	ECVF_Default);

TAutoConsoleVariable<int32> CVarJPEGGpu(
	TEXT("remote.arcameraqcgpucompressed"),
	1,
	TEXT("1 (default) compresses on the GPU, 0 on the CPU"),
	ECVF_Default);

BEGIN_SHADER_PARAMETER_STRUCT(FRemoteSessionARCameraMaterialParameters, )

#Loc: <Workspace>/Engine/Plugins/Experimental/RemoteSession/Source/RemoteSession/Private/Channels/RemoteSessionARCameraChannel.cpp:433

Scope (from outer to inner):

file
function     void FRemoteSessionARCameraChannel::QueueARCameraImage

Source code excerpt:

		CompressionTask->Width = CameraImage->Size.X;
		CompressionTask->Height = CameraImage->Size.Y;
		CompressionTask->AsyncTask = IAppleImageUtilsPlugin::Get().ConvertToJPEG(CameraImage, CVarJPEGQuality.GetValueOnGameThread(), !!CVarJPEGColor.GetValueOnGameThread(), !!CVarJPEGGpu.GetValueOnGameThread());
    }
    else
    {
        UE_LOG(LogRemoteSession, Warning, TEXT("No AR Camera Image to send!"));
    }
}