bSupportsMobileMultiView

bSupportsMobileMultiView

#Overview

name: bSupportsMobileMultiView

The value of this variable can be defined or overridden in .ini config files. 5 .ini config files referencing this setting variable.

It is referenced in 9 C++ source files.

#Summary

#Usage in the C++ source code

The purpose of bSupportsMobileMultiView is to indicate whether the current device supports mobile multi-view rendering, which is a technique used in VR applications to improve performance by rendering both eyes’ views simultaneously.

This setting variable is primarily used in the OpenGL ES rendering subsystem of Unreal Engine 5. It is part of the OpenGLDrv module, which handles OpenGL ES-specific rendering functionality.

The value of this variable is set in the FOpenGLES::ProcessExtensions function, where it checks for the availability of specific OpenGL ES extensions related to multi-view rendering (glFramebufferTextureMultiviewOVR and glFramebufferTextureMultisampleMultiviewOVR).

This variable interacts with other rendering-related variables and functions, particularly those involved in VR rendering and mobile graphics optimization.

Developers should be aware that:

  1. This feature is specific to mobile VR rendering on OpenGL ES platforms.
  2. The presence of the extension doesn’t guarantee the feature works correctly, as noted in the code comments.
  3. It may affect how stereo rendering is implemented for VR applications.

Best practices when using this variable include:

  1. Checking its value before attempting to use multi-view rendering techniques.
  2. Providing fallback rendering paths for devices that don’t support mobile multi-view.
  3. Testing on a variety of devices to ensure compatibility and performance benefits.
  4. Using it in conjunction with other VR-specific optimizations for best results.

#Setting Variables

#References In INI files

Location: <Workspace>/Engine/Config/Android/DataDrivenPlatformInfo.ini:63, section: [ShaderPlatform OPENGL_ES3_1_ANDROID]

Location: <Workspace>/Engine/Config/Android/DataDrivenPlatformInfo.ini:80, section: [ShaderPlatform VULKAN_ES3_1_ANDROID]

Location: <Workspace>/Engine/Config/VulkanPC/DataDrivenPlatformInfo.ini:27, section: [ShaderPlatform VULKAN_SM5]

Location: <Workspace>/Engine/Config/VulkanPC/DataDrivenPlatformInfo.ini:156, section: [ShaderPlatform VULKAN_SM6]

Location: <Workspace>/Engine/Config/VulkanPC/DataDrivenPlatformInfo.ini:267, section: [ShaderPlatform VULKAN_PCES3_1]

#References in C++ code

#Callsites

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

#Loc: <Workspace>/Engine/Source/Runtime/OpenGLDrv/Private/OpenGLES.cpp:138

Scope: file

Source code excerpt:


bool FOpenGLES::bHasHardwareHiddenSurfaceRemoval = false;
bool FOpenGLES::bSupportsMobileMultiView = false;
GLint FOpenGLES::MaxMSAASamplesTileMem = 1;

GLint FOpenGLES::MaxComputeUniformComponents = -1;

GLint FOpenGLES::MaxComputeUAVUnits = -1;
GLint FOpenGLES::MaxPixelUAVUnits = -1;

#Loc: <Workspace>/Engine/Source/Runtime/OpenGLDrv/Private/OpenGLES.cpp:296

Scope (from outer to inner):

file
function     void FOpenGLES::ProcessExtensions

Source code excerpt:

		glFramebufferTextureMultisampleMultiviewOVR = (PFNGLFRAMEBUFFERTEXTUREMULTISAMPLEMULTIVIEWOVRPROC)((void*)eglGetProcAddress("glFramebufferTextureMultisampleMultiviewOVR"));

		bSupportsMobileMultiView = (glFramebufferTextureMultiviewOVR != NULL) && (glFramebufferTextureMultisampleMultiviewOVR != NULL);

		// Just because the driver declares multi-view support and hands us valid function pointers doesn't actually guarantee the feature works...
		if (bSupportsMobileMultiView)
		{
			UE_LOG(LogRHI, Log, TEXT("Device supports mobile multi-view."));
		}
	}
	
	if (IsES32Usable())

#Loc: <Workspace>/Engine/Source/Runtime/OpenGLDrv/Public/OpenGLES.h:202

Scope (from outer to inner):

file
function     static bool SupportsMobileMultiView

Source code excerpt:

	static FORCEINLINE bool SupportsPolygonMode() { return false; }
	static FORCEINLINE bool SupportsTexture3D() { return true; }
	static FORCEINLINE bool SupportsMobileMultiView() { return bSupportsMobileMultiView; }
	static FORCEINLINE bool SupportsImageExternal() { return false; }
	static FORCEINLINE bool SupportsTextureLODBias() { return false; }
	static FORCEINLINE bool SupportsTextureCompare() { return false; }
	static FORCEINLINE bool SupportsDrawIndexOffset() { return false; }
	static FORCEINLINE bool SupportsDiscardFrameBuffer() { return true; }
	static FORCEINLINE bool SupportsIndexedExtensions() { return false; }

#Loc: <Workspace>/Engine/Source/Runtime/OpenGLDrv/Public/OpenGLES.h:896

Scope: file

Source code excerpt:


	/** Whether device supports mobile multi-view */
	static bool bSupportsMobileMultiView;

	static GLint MaxComputeUniformComponents;

	static GLint MaxCombinedUAVUnits;
	static GLint MaxComputeUAVUnits;
	static GLint MaxPixelUAVUnits;

#Loc: <Workspace>/Engine/Source/Runtime/RHI/Private/DataDrivenShaderPlatformInfo.cpp:204

Scope (from outer to inner):

file
function     void FGenericDataDrivenShaderPlatformInfo::ParseDataDrivenShaderInfo

Source code excerpt:

	GET_SECTION_BOOL_HELPER(bIsAndroidOpenGLES);
	GET_SECTION_BOOL_HELPER(bSupportsDebugViewShaders);
	GET_SECTION_BOOL_HELPER(bSupportsMobileMultiView);
	GET_SECTION_BOOL_HELPER(bSupportsArrayTextureCompression);
	GET_SECTION_BOOL_HELPER(bSupportsDistanceFields);
	GET_SECTION_BOOL_HELPER(bSupportsDiaphragmDOF);
	GET_SECTION_BOOL_HELPER(bSupportsRGBColorBuffer);
	GET_SECTION_BOOL_HELPER(bSupportsCapsuleShadows);
	GET_SECTION_BOOL_HELPER(bSupportsPercentageCloserShadows);

#Loc: <Workspace>/Engine/Source/Runtime/RHI/Private/DataDrivenShaderPlatformInfo.cpp:446

Scope (from outer to inner):

file
function     void FGenericDataDrivenShaderPlatformInfo::UpdatePreviewPlatforms

Source code excerpt:

				// particularly MobileMultiView may be substituted by a fallback path. In order to avoid inundating real mobile platforms
				// with the properties needed for the desktop MMV fallback path, override them here with the editor ones to make MMV preview possible
				if (PreviewInfo.bSupportsMobileMultiView && !RuntimeInfo.bSupportsMobileMultiView)
				{
					PREVIEW_USE_RUNTIME_VALUE(bSupportsInstancedStereo);
					PREVIEW_USE_RUNTIME_VALUE(bSupportsVertexShaderLayer);
				}
				else
				{

#Loc: <Workspace>/Engine/Source/Runtime/RHI/Private/DataDrivenShaderPlatformInfo.cpp:466

Scope (from outer to inner):

file
function     void FGenericDataDrivenShaderPlatformInfo::UpdatePreviewPlatforms

Source code excerpt:

				PREVIEW_DISABLE_IF_RUNTIME_UNSUPPORTED(bSupportsMeshShadersTier0);
				PREVIEW_DISABLE_IF_RUNTIME_UNSUPPORTED(bSupportsMeshShadersTier1);
				PREVIEW_DISABLE_IF_RUNTIME_UNSUPPORTED(bSupportsMobileMultiView);

				// Settings that need to match the runtime
				PREVIEW_USE_RUNTIME_VALUE(bSupportsGPUScene);
				PREVIEW_USE_RUNTIME_VALUE(MaxMeshShaderThreadGroupSize);
				PREVIEW_USE_RUNTIME_VALUE(bSupportsSceneDataCompressedTransforms);
				PREVIEW_USE_RUNTIME_VALUE(bSupportsVertexShaderSRVs);

#Loc: <Workspace>/Engine/Source/Runtime/RHI/Public/DataDrivenShaderPlatformInfo.h:30

Scope (from outer to inner):

file
class        class FGenericDataDrivenShaderPlatformInfo

Source code excerpt:


	uint32 bSupportsDebugViewShaders : 1;
	uint32 bSupportsMobileMultiView : 1;
	uint32 bSupportsArrayTextureCompression : 1;
	uint32 bSupportsDistanceFields : 1; // used for DFShadows and DFAO - since they had the same checks
	uint32 bSupportsDiaphragmDOF : 1;
	uint32 bSupportsRGBColorBuffer : 1;
	uint32 bSupportsCapsuleShadows : 1;
	uint32 bSupportsPercentageCloserShadows : 1;

#Loc: <Workspace>/Engine/Source/Runtime/RHI/Public/DataDrivenShaderPlatformInfo.h:239

Scope (from outer to inner):

file
class        class FGenericDataDrivenShaderPlatformInfo
function     static const bool GetSupportsMobileMultiView

Source code excerpt:

	{
		check(IsValid(Platform));
		return Infos[Platform].bSupportsMobileMultiView;
	}

	static FORCEINLINE_DEBUGGABLE const bool GetSupportsArrayTextureCompression(const FStaticShaderPlatform Platform)
	{
		check(IsValid(Platform));
		return Infos[Platform].bSupportsArrayTextureCompression;