Browse Source

New VR pipeline related changes (#60)

- Part of the fix to allow the Gamelauncher to function if a device is not connected but OpenXR is enabled
- Enable OpenXR by default
- Set resolution scale to 1.0 by default

Core engine - https://github.com/o3de/o3de/pull/13141
ASV related PR - o3de/o3de-atom-sampleviewer#549

Signed-off-by: moudgils <[email protected]>
moudgils 2 years ago
parent
commit
e82d3be45e

+ 4 - 1
Gems/XR/Code/Source/XRSystem.cpp

@@ -146,7 +146,10 @@ namespace XR
 
     void System::OnSystemTick()
     {
-        m_session->PollEvents();
+        if (m_session)
+        {
+            m_session->PollEvents();
+        }
     }
     
     void System::BeginFrame()

+ 14 - 194
Projects/OpenXRTest/Levels/XR_Office/XR_Office.prefab

@@ -172,7 +172,7 @@
                     "Controller": {
                         "Configuration": {
                             "Field of View": 80.0,
-                            "EditorEntityId": 13623625560977361780
+                            "EditorEntityId": 8569118030471583375
                         }
                     }
                 },
@@ -983,7 +983,7 @@
                     "Id": 17259614531075895979,
                     "Controller": {
                         "Configuration": {
-                            "LightType": 2,
+                            "LightType": 7,
                             "Intensity": 25.0,
                             "AttenuationRadiusMode": 0,
                             "AttenuationRadius": 10.0,
@@ -997,21 +997,6 @@
                         }
                     }
                 },
-                "Component_[6846338249585826296]": {
-                    "$type": "EditorDiskShapeComponent",
-                    "Id": 6846338249585826296,
-                    "ShapeColor": [
-                        1.0,
-                        1.0,
-                        1.0,
-                        1.0
-                    ],
-                    "DiskShape": {
-                        "Configuration": {
-                            "Radius": 0.05000000074505806
-                        }
-                    }
-                },
                 "Component_[7273459018837481091]": {
                     "$type": "EditorDisabledCompositionComponent",
                     "Id": 7273459018837481091
@@ -1072,7 +1057,7 @@
                     "Id": 17259614531075895979,
                     "Controller": {
                         "Configuration": {
-                            "LightType": 2,
+                            "LightType": 7,
                             "Intensity": 25.0,
                             "AttenuationRadiusMode": 0,
                             "AttenuationRadius": 10.0,
@@ -1086,21 +1071,6 @@
                         }
                     }
                 },
-                "Component_[6846338249585826296]": {
-                    "$type": "EditorDiskShapeComponent",
-                    "Id": 6846338249585826296,
-                    "ShapeColor": [
-                        1.0,
-                        1.0,
-                        1.0,
-                        1.0
-                    ],
-                    "DiskShape": {
-                        "Configuration": {
-                            "Radius": 0.05000000074505806
-                        }
-                    }
-                },
                 "Component_[7273459018837481091]": {
                     "$type": "EditorDisabledCompositionComponent",
                     "Id": 7273459018837481091
@@ -1161,7 +1131,7 @@
                     "Id": 17259614531075895979,
                     "Controller": {
                         "Configuration": {
-                            "LightType": 2,
+                            "LightType": 7,
                             "Intensity": 25.0,
                             "AttenuationRadiusMode": 0,
                             "AttenuationRadius": 10.0,
@@ -1175,21 +1145,6 @@
                         }
                     }
                 },
-                "Component_[6846338249585826296]": {
-                    "$type": "EditorDiskShapeComponent",
-                    "Id": 6846338249585826296,
-                    "ShapeColor": [
-                        1.0,
-                        1.0,
-                        1.0,
-                        1.0
-                    ],
-                    "DiskShape": {
-                        "Configuration": {
-                            "Radius": 0.05000000074505806
-                        }
-                    }
-                },
                 "Component_[7273459018837481091]": {
                     "$type": "EditorDisabledCompositionComponent",
                     "Id": 7273459018837481091
@@ -1250,7 +1205,7 @@
                     "Id": 17259614531075895979,
                     "Controller": {
                         "Configuration": {
-                            "LightType": 2,
+                            "LightType": 7,
                             "Intensity": 25.0,
                             "AttenuationRadiusMode": 0,
                             "AttenuationRadius": 10.0,
@@ -1264,21 +1219,6 @@
                         }
                     }
                 },
-                "Component_[6846338249585826296]": {
-                    "$type": "EditorDiskShapeComponent",
-                    "Id": 6846338249585826296,
-                    "ShapeColor": [
-                        1.0,
-                        1.0,
-                        1.0,
-                        1.0
-                    ],
-                    "DiskShape": {
-                        "Configuration": {
-                            "Radius": 0.05000000074505806
-                        }
-                    }
-                },
                 "Component_[7273459018837481091]": {
                     "$type": "EditorDisabledCompositionComponent",
                     "Id": 7273459018837481091
@@ -1435,7 +1375,7 @@
                     "Id": 17259614531075895979,
                     "Controller": {
                         "Configuration": {
-                            "LightType": 2,
+                            "LightType": 7,
                             "Intensity": 25.0,
                             "AttenuationRadiusMode": 0,
                             "AttenuationRadius": 10.0,
@@ -1449,21 +1389,6 @@
                         }
                     }
                 },
-                "Component_[6846338249585826296]": {
-                    "$type": "EditorDiskShapeComponent",
-                    "Id": 6846338249585826296,
-                    "ShapeColor": [
-                        1.0,
-                        1.0,
-                        1.0,
-                        1.0
-                    ],
-                    "DiskShape": {
-                        "Configuration": {
-                            "Radius": 0.05000000074505806
-                        }
-                    }
-                },
                 "Component_[7273459018837481091]": {
                     "$type": "EditorDisabledCompositionComponent",
                     "Id": 7273459018837481091
@@ -1524,7 +1449,7 @@
                     "Id": 17259614531075895979,
                     "Controller": {
                         "Configuration": {
-                            "LightType": 2,
+                            "LightType": 7,
                             "Intensity": 25.0,
                             "AttenuationRadiusMode": 0,
                             "AttenuationRadius": 10.0,
@@ -1538,21 +1463,6 @@
                         }
                     }
                 },
-                "Component_[6846338249585826296]": {
-                    "$type": "EditorDiskShapeComponent",
-                    "Id": 6846338249585826296,
-                    "ShapeColor": [
-                        1.0,
-                        1.0,
-                        1.0,
-                        1.0
-                    ],
-                    "DiskShape": {
-                        "Configuration": {
-                            "Radius": 0.05000000074505806
-                        }
-                    }
-                },
                 "Component_[7273459018837481091]": {
                     "$type": "EditorDisabledCompositionComponent",
                     "Id": 7273459018837481091
@@ -1613,7 +1523,7 @@
                     "Id": 17259614531075895979,
                     "Controller": {
                         "Configuration": {
-                            "LightType": 2,
+                            "LightType": 7,
                             "Intensity": 25.0,
                             "AttenuationRadiusMode": 0,
                             "AttenuationRadius": 10.0,
@@ -1627,21 +1537,6 @@
                         }
                     }
                 },
-                "Component_[6846338249585826296]": {
-                    "$type": "EditorDiskShapeComponent",
-                    "Id": 6846338249585826296,
-                    "ShapeColor": [
-                        1.0,
-                        1.0,
-                        1.0,
-                        1.0
-                    ],
-                    "DiskShape": {
-                        "Configuration": {
-                            "Radius": 0.05000000074505806
-                        }
-                    }
-                },
                 "Component_[7273459018837481091]": {
                     "$type": "EditorDisabledCompositionComponent",
                     "Id": 7273459018837481091
@@ -1702,7 +1597,7 @@
                     "Id": 17259614531075895979,
                     "Controller": {
                         "Configuration": {
-                            "LightType": 2,
+                            "LightType": 7,
                             "Intensity": 25.0,
                             "AttenuationRadiusMode": 0,
                             "AttenuationRadius": 10.0,
@@ -1716,21 +1611,6 @@
                         }
                     }
                 },
-                "Component_[6846338249585826296]": {
-                    "$type": "EditorDiskShapeComponent",
-                    "Id": 6846338249585826296,
-                    "ShapeColor": [
-                        1.0,
-                        1.0,
-                        1.0,
-                        1.0
-                    ],
-                    "DiskShape": {
-                        "Configuration": {
-                            "Radius": 0.05000000074505806
-                        }
-                    }
-                },
                 "Component_[7273459018837481091]": {
                     "$type": "EditorDisabledCompositionComponent",
                     "Id": 7273459018837481091
@@ -1839,7 +1719,7 @@
                                 },
                                 "assetHint": "assets/textures/reflectionprobes/refprobmain__5671e21b-ba4c-48c7-8e30-8f8a0428ab82__iblspecularcm256.dds.streamingimage"
                             },
-                            "EntityId": 4753779298488703029,
+                            "EntityId": 12239824278503418025,
                             "ShowVisualization": false,
                             "RenderExposure": 1.0
                         }
@@ -1893,7 +1773,7 @@
                     "Id": 17259614531075895979,
                     "Controller": {
                         "Configuration": {
-                            "LightType": 2,
+                            "LightType": 7,
                             "Intensity": 25.0,
                             "AttenuationRadiusMode": 0,
                             "AttenuationRadius": 10.0,
@@ -1907,21 +1787,6 @@
                         }
                     }
                 },
-                "Component_[6846338249585826296]": {
-                    "$type": "EditorDiskShapeComponent",
-                    "Id": 6846338249585826296,
-                    "ShapeColor": [
-                        1.0,
-                        1.0,
-                        1.0,
-                        1.0
-                    ],
-                    "DiskShape": {
-                        "Configuration": {
-                            "Radius": 0.05000000074505806
-                        }
-                    }
-                },
                 "Component_[7273459018837481091]": {
                     "$type": "EditorDisabledCompositionComponent",
                     "Id": 7273459018837481091
@@ -1982,7 +1847,7 @@
                     "Id": 17259614531075895979,
                     "Controller": {
                         "Configuration": {
-                            "LightType": 2,
+                            "LightType": 7,
                             "Intensity": 25.0,
                             "AttenuationRadiusMode": 0,
                             "AttenuationRadius": 10.0,
@@ -1996,21 +1861,6 @@
                         }
                     }
                 },
-                "Component_[6846338249585826296]": {
-                    "$type": "EditorDiskShapeComponent",
-                    "Id": 6846338249585826296,
-                    "ShapeColor": [
-                        1.0,
-                        1.0,
-                        1.0,
-                        1.0
-                    ],
-                    "DiskShape": {
-                        "Configuration": {
-                            "Radius": 0.05000000074505806
-                        }
-                    }
-                },
                 "Component_[7273459018837481091]": {
                     "$type": "EditorDisabledCompositionComponent",
                     "Id": 7273459018837481091
@@ -2071,7 +1921,7 @@
                     "Id": 17259614531075895979,
                     "Controller": {
                         "Configuration": {
-                            "LightType": 2,
+                            "LightType": 7,
                             "Intensity": 25.0,
                             "AttenuationRadiusMode": 0,
                             "AttenuationRadius": 10.0,
@@ -2085,21 +1935,6 @@
                         }
                     }
                 },
-                "Component_[6846338249585826296]": {
-                    "$type": "EditorDiskShapeComponent",
-                    "Id": 6846338249585826296,
-                    "ShapeColor": [
-                        1.0,
-                        1.0,
-                        1.0,
-                        1.0
-                    ],
-                    "DiskShape": {
-                        "Configuration": {
-                            "Radius": 0.05000000074505806
-                        }
-                    }
-                },
                 "Component_[7273459018837481091]": {
                     "$type": "EditorDisabledCompositionComponent",
                     "Id": 7273459018837481091
@@ -2160,7 +1995,7 @@
                     "Id": 17259614531075895979,
                     "Controller": {
                         "Configuration": {
-                            "LightType": 2,
+                            "LightType": 7,
                             "Intensity": 25.0,
                             "AttenuationRadiusMode": 0,
                             "AttenuationRadius": 10.0,
@@ -2174,21 +2009,6 @@
                         }
                     }
                 },
-                "Component_[6846338249585826296]": {
-                    "$type": "EditorDiskShapeComponent",
-                    "Id": 6846338249585826296,
-                    "ShapeColor": [
-                        1.0,
-                        1.0,
-                        1.0,
-                        1.0
-                    ],
-                    "DiskShape": {
-                        "Configuration": {
-                            "Radius": 0.05000000074505806
-                        }
-                    }
-                },
                 "Component_[7273459018837481091]": {
                     "$type": "EditorDisabledCompositionComponent",
                     "Id": 7273459018837481091

+ 2 - 2
Projects/OpenXRTest/Registry/OpenXR.setreg

@@ -2,8 +2,8 @@
     "O3DE": {
         "Atom": {
             "OpenXR": {
-                "Enable": false,
-                "android_ViewResolutionScale": 0.5
+                "Enable": true,
+                "android_ViewResolutionScale": 1.0
             }
         }
     }