You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.. UPDATE: Not supported yet. When all or most post process effects work in
43
-
.. stereoscopic rendering, remove or update this note.
44
-
45
-
.. warning::
46
-
As Godot 4 is still in development, many post process effects have not yet been updated to support stereoscopic rendering. Using these will have adverse effects.
47
-
48
-
.. UPDATE: Recommended renderer may change. If the Mobile renderer (or any other
49
-
.. renderer) is recommended for all XR projects, update this note.
50
-
51
-
.. note::
52
-
Godot 4 has 3 renderer options, Compatibility, Mobile, and Forward+. In the future XR desktop projects should use Forward+, and projects for standalone headsets
53
-
should use Mobile. Currently Compatibility is the recommended renderer for standalone headsets, and ironically Mobile is the recommended renderer for desktop.
54
-
This is based on current XR performance on the different devices with each renderer.
34
+
Godot has 3 renderer options for projects: Compatibility, Mobile, and Forward+.
35
+
The current recommendation is to use the Mobile renderer for any desktop VR project,
36
+
and use the Compatibility renderer for any project running on a standalone headset
37
+
like the Meta Quest 3. XR projects will run with the Forward+ renderer, but it isn't
38
+
well optimized for XR right now compared to the other two.
55
39
56
40
OpenXR
57
41
------
@@ -60,27 +44,41 @@ OpenXR is a new industry standard that allows different XR platforms to present
60
44
61
45
The Vulkan implementation of OpenXR is closely integrated with Vulkan, taking over part of the Vulkan system. This requires tight integration of certain core graphics features in the Vulkan renderer which are needed before the XR system is setup. This was one of the main deciding factors to include OpenXR as a core interface.
62
46
63
-
This also means OpenXR needs to be enabled when Godot starts in order to set things up correctly. The required setting can be found in your project settings:
47
+
This also means OpenXR needs to be enabled when Godot starts in order to set things
48
+
up correctly. Check the :ref:`Enabled<class_ProjectSettings_property_xr/openxr/enabled>`
49
+
setting in your project settings under **XR > OpenXR**.
50
+
51
+
.. image:: img/openxr_settings.webp
52
+
53
+
You can find several other settings related to OpenXR here as well. These can't be
54
+
changed while your application is running. The default settings will get us started,
55
+
but for more information on what's here see :ref:`doc_openxr_settings`.
64
56
65
-
.. image:: img/openxr_settings.png
57
+
You'll also need to go to **XR > Shaders** in the project settings and check the
box to enable them. Once you've done that click the **Save & Restart** button.
60
+
61
+
.. image:: img/xr_shaders.webp
62
+
63
+
.. warning::
64
+
Many post process effects have not yet been updated to support stereoscopic rendering. Using these will have adverse effects.
66
65
67
-
As setup is brought forward with OpenXR you can find several other settings related to OpenXR here as well. These can't be changed while your application is running.
68
-
The default settings will get us started and we will go into detail in another section of the documentation.
69
66
70
67
Setting up the XR scene
71
68
-----------------------
72
69
73
70
Every XR application needs at least an :ref:`XROrigin3D <class_xrorigin3d>` and an :ref:`XRCamera3D <class_xrcamera3d>` node. Most will have two :ref:`XRController3D <class_xrcontroller3d>`, one for the left hand and one for the right. Keep in mind that the camera and controller nodes should be children of the origin node. Add these nodes to a new scene and rename the controller nodes to ``LeftHand`` and ``RightHand``, your scene should look something like this:
74
71
75
-
.. image:: img/xr_basic_scene.png
72
+
.. image:: img/xr_basic_scene.webp
76
73
77
-
Next you need to configure the controllers, select the left hand and set it up as follows:
74
+
The warning icons are expected and should go away after you configure the
75
+
controllers. Select the left hand and set it up as follows:
78
76
79
-
.. image:: img/xr_left_hand.png
77
+
.. image:: img/xr_left_hand.webp
80
78
81
79
And the right hand:
82
80
83
-
.. image:: img/xr_right_hand.png
81
+
.. image:: img/xr_right_hand.webp
84
82
85
83
Right now all these nodes are on the floor, they will be positioned correctly in runtime. To help during development, it can be helpful to move the camera upwards so its ``y`` is set to ``1.7``, and move the controller nodes to ``-0.5, 1.0, -0.5`` and ``0.5, 1.0, -0.5`` for respectively the left and right hand.
0 commit comments