Unreal engine 5.1 - VR project crashes while being creates

I have just installed Unreal Engine 5.1 on my Macbook Pro M1 , macOS Monterey. I wanted to create a VR project, but it crashes at 10% of creating. I will put here the whole error, maybe someone has any idea, maybe it is a compatibility issue. AR, First person, etc, every other type works, except of VR. Thanks in advance :slight_smile:

Assertion failed: !bInstancedStereoEnabled || (bInstancedMultiViewportEnabled || bMobileMultiViewFallback) [File:./Runtime/RenderCore/Private/StereoRenderUtils.cpp] [Line: 125] If ISR is enabled, we need either multi-viewport (since we no longer support clip-distance method) or MMV fallback (which uses vertex layer).

UE::StereoRenderUtils::FStereoShaderAspects::FStereoShaderAspects(EShaderPlatform) Address = 0x10ffd8f01 (filename not found) [in UnrealEditor-RenderCore.dylib]
ShaderMapAppendKeyString(EShaderPlatform, FString&) Address = 0x10fee5062 (filename not found) [in UnrealEditor-RenderCore.dylib]
GetGlobalShaderMapKeyString(FGlobalShaderMapId const&, EShaderPlatform, TArray<FShaderTypeDependency, TSizedDefaultAllocator<32> > const&) Address = 0x1195250b7 (filename not found) [in UnrealEditor-Engine.dylib]
GetGlobalShaderMapKey(FGlobalShaderMapId const&, EShaderPlatform, ITargetPlatform const*, TArray<FShaderTypeDependency, TSizedDefaultAllocator<32> > const&) Address = 0x119524e56 (filename not found) [in UnrealEditor-Engine.dylib]
CompileGlobalShaderMap(EShaderPlatform, ITargetPlatform const*, bool) Address = 0x119522984 (filename not found) [in UnrealEditor-Engine.dylib]
FEngineLoop::PreInitPreStartupScreen(char16_t const*) Address = 0x1003d75e2 (filename not found) [in UnrealEditor]
GuardedMain(char16_t const*) Address = 0x1003ce3e3 (filename not found) [in UnrealEditor]
-[UEAppDelegate runGameThread:] Address = 0x1003e9725 (filename not found) [in UnrealEditor]
-[FCocoaGameThread main] Address = 0x10ab7b2fc (filename not found) [in UnrealEditor-Core.dylib]
Unknown() Address = 0x7ff81237a994 (filename not found) [in Foundation]
_pthread_start Address = 0x7ff8115294e1 (filename not found) [in libsystem_pthread.dylib]
thread_start Address = 0x7ff811524f6b (filename not found) [in libsystem_pthread.dylib]
5 Likes

Hi,
I just had the same error message + crash (also macOS Monterey). After reading the log message, I changed
“vr.InstancedStereo=True” to “vr.InstancedStereo=False”
in the DefaultEngine.ini which is located in {Project Dir}/Config and now it’s working (I think, it’s still compiling shaders…)

8 Likes

Thanks mate, worked for me.

Thank you, worked for me too!!!

Thank you! This also made my VRTemplate project work in 5.1.0 M1 Mac.

I am still wondering why this affects it? Does this imply this vr.InstancedStereo feature as not supported?

image
thank you

Seems like it might be failing because GRHISupportsArrayIndexFromAnyShader is not set for Metal, and it’s required for instanced stereo. I have no idea if Metal is supposed to support it or not though.

What is the use case for running VR on a Mac? I don’t think any current headsets or runtimes support it.

When I changed
“vr.InstancedStereo=True” to “vr.InstancedStereo=False”, I got another error:
LoginId:a005eafa4b272e7e8ecde298de7eed2c

EpicAccountId:052bdbf235cc467b80515711fbb0e46f

Fatal error: [File:D:\build++UE5\Sync\Engine\Source\Runtime\Engine\Private\ShaderCompiler\ShaderCompiler.cpp] [Line: 4668] /Engine/Generated/Material.ush(3209,18-88): error X3004: undeclared identifier ‘SceneTextureLookup’ /Engine/Generated/Material.ush(3209,19-89): error X3004: undeclared identifier ‘SceneTextureLookup’ Failed to compile default material /Engine/EngineMaterials/DefaultPostProcessMaterial.DefaultPostProcessMaterial!

UnrealEditor_Engine

UnrealEditor_Engine

UnrealEditor_Engine

UnrealEditor_Engine

UnrealEditor_Engine

UnrealEditor_Engine

UnrealEditor_Engine

UnrealEditor_Engine

UnrealEditor_Engine

UnrealEditor_UnrealEd

UnrealEditor_UnrealEd

UnrealEditor_UnrealEd

UnrealEditor_UnrealEd

UnrealEditor

UnrealEditor_UnrealEd

UnrealEditor

UnrealEditor

UnrealEditor

UnrealEditor

UnrealEditor

kernel32

ntdll

I’m hoping to (eventually) be able to use my M2 Mac do develop for Quest 2 and Quest Pro. So I just need to be able to run the editor without to many flaws, and be able to compile for the Quest.
Seems the regular OpenXR plugin works, but not the MetaXR plugin, and thereby not the Quest Hand tracking and face- and eye-tracking on the Pro.

Maybe it’s possible to switch over UE to a mobile preview mode, and get instanced stereo to work that way.

The Meta plugin seems to come with a lot of its code in a proprietary windows .dll, it might need to load that to be able to function in the editor.

this worked, thank you!

It’s very unlikely that the MetaXR plugin will get support for MacOS. If you intend to use any of Meta’s device specific features, you have to develop on Windows, as most of them are only supported through their plugin.

Huge thanks for the fix! It was really starting to do my head in… Might be nice if this was fixed in-house if it was this simple :wink:

Thank you :slight_smile: