OpenXR black screen

Godot Version

4.2.2

Question

I am trying to make open xr work. I have my meta quest 2 connected to my windows 10 laptop using Virtual Desktop. I followed the setting_up_xr tutorial. This is my scene tree:

Node3D

  • MeshInstance3D
  • OmniLight3D
  • XROrigin
    • XRControllerRight
      • MeshInstance3D
    • XRControllerLeft
      • MeshInstance3Dnd
    • XRCamera

And a script from the tutorial in the Node3D

When I start the scene i get this i the Debugger:

E 0:00:05:0550 _display_error_with_code: SceneShaderGLES3: Vertex shader compilation failed:
ERROR: 0:27: ‘num_views’ : syntax error syntax error

<C++ Source> drivers/gles3/shader_gles3.cpp:252 @ _display_error_with_code()

E 0:00:05:0550 _compile_specialization: Method/function failed.
<C++ Source> drivers/gles3/shader_gles3.cpp:346 @ _compile_specialization()

and open xr outputs this:

OpenXR: Requested OpenGL version does not meet the minimum version this runtime supports.

  • desired_version 3.3.0
  • minApiVersionSupported 4.3.0
  • maxApiVersionSupported 4.6.0
    OpenXR: Trying to initialize with OpenGL anyway…

and than a 300 line script starting like this:

1: #version 330
2: #define USE_GLES_OVER_GL
3: #define DISABLE_LIGHTMAP
4: #define DISABLE_LIGHT_DIRECTIONAL
5: #define DISABLE_LIGHT_OMNI
6: #define DISABLE_LIGHT_SPOT
7: #define DISABLE_FOG
8: #define USE_MULTIVIEW

this script is outputed over and over again up to this

[output overflow, print less text!]

In my VR headset i can see steam VR loading the game but than everything is just black, the same happends in the debug window. The game does not crash and the controllers and the vr headset position is updated correctly.

My Laptop has 8GB RAM, an intel core i7-6500U cpu and intel HD Graphics 520.

edit: I could’nt get it to work. I just use the remote debug

Strange bug! I have done a little bit with vr with Godot 4. I don’t think OpenXR uses SteamVR, but I could very well be wrong on that. I would also try doing it through the quest’s built in PCVR system. When I do Godot VR I just launch the application with the oculus app open and connected as well, and it boots right into vr.

I think it uses steam vr because of virtual desktop and I don’t know why but the Meta quest app can’t connect to my headset on this laptop.

I just exported the project as apk, installed it on my quest and it’s still not working so it can’t be steamVR

well that might not be a godot issue then… maybe research the app problem? I don’t know, just throwing ideas out there.

The meta quest app might not be working as the gpu or integrated graphuces may not have the hardware encoder meta requires, that was my problem until i upgraded my gpu. Have you tried starting a fresh project and following directly of the xr starter documentation. To isolate the problem whether its godot, dont install the xr tools plugin as that may also be causing a problen

Yes that might be the issue with meta quest. I had the same problem with steam VR link but the meta quest app doesn’t tell you that and just waits for the headset to connect. But I think I will now only use remote debug until I get back home and can use my desktop PC.

1 Like