phr00t / FocusEngine

Focus Game Engine. This is Stride/Xenko fast-tracked for Phr00t's Software games. Improvements over the original Focus on Vulkan support, PC platforms, VR, performance & ease. Cherry-picks commits from other forks as needed.
MIT License
97 stars 11 forks source link

Add OpenXR Support #105

Closed phr00t closed 3 years ago

phr00t commented 3 years ago

Valve is transitioning to OpenXR away from OpenVR.

The biggest issue is, currently, Focus Engine uses SteamVR Input v1.0, which has overall been great at not requiring input customization for each device. However, it looks like even OpenXR is using the actions system of strings, so it is a question on how long future hardware will support Input v1.0.

If we take on implementing SteamVR Input v2.0, might as well make the leap to OpenXR for future-proofing support.

With that said, this shouldn't be rushed into. OpenXR has just started to roll out support, and OpenVR is still supported for future hardware according to Valve. Documentation and tools to transition should only get better in time.

Good place to get started: https://gitlab.freedesktop.org/monado/demos/openxr-simple-example/-/blob/master/main.c

phr00t commented 3 years ago

Program starts here: https://gitlab.freedesktop.org/monado/demos/openxr-simple-example/-/blob/master/main.c#L483

Silk.NET.OpenXR Nuget package should provide API access.

phr00t commented 3 years ago

Silk.NET.OpenXR bindings are currently broken and am awaiting a fix

https://github.com/dotnet/Silk.NET/issues/500

phr00t commented 3 years ago

Progress is going great, but still much left to do. Currently stuck on a headset latency problem, asking the OpenXR team for help: https://community.khronos.org/t/focus-engine-openxr-2-questions-bad-latency-vulkan2/107444

phr00t commented 3 years ago

Asking for help on the SteamVR forums: https://steamcommunity.com/app/250820/discussions/8/3077629031367179235/

phr00t commented 3 years ago

Fixed latency issues, and now controller tracking is working... still left to map some controller actions and get velocities working.

phr00t commented 3 years ago

OpenXR support is complete!