Commit Graph

161 Commits

Author SHA1 Message Date
bjorn 8b1b262760 lovr.visible; lovr.headset.isVisible; 2023-06-13 21:06:05 -07:00
bjorn bd96b6afba Re-enable headless support on Android;
monado bug has since been fixed.
2023-05-26 17:04:18 -07:00
bjorn 9092545e9a Add bindings for Magic Leap 2 controller;
Notably, shoulder button is mapped to grip for now.
2023-05-26 17:03:11 -07:00
bjorn 4f29e3992c Don't bind pico4 actions if extension is unsupported; 2023-05-26 16:44:14 -07:00
duinodu 773c021d2d Add Pico4 support. 2023-05-18 15:27:18 +08:00
bjorn 08b911e142 Fix OpenXR interface; 2023-05-12 18:23:23 +01:00
bjorn 895f282241 Rename headet display frequencies to refresh rates;
Old API remains in deprecated state.
2023-05-12 18:01:42 +01:00
bjorn 3f5e3bb0ed Improve passthrough API;
- lovr.headset.getPassthrough returns current passthrough mode
- lovr.headset.setPassthrough sets the passthrough mode
  - nil --> uses the default passthrough mode for the headset
  - bool --> false = opaque, true = one of the transparent modes
  - string --> explicit PassthroughMode
- lovr.headset.getPassthroughModes returns a table of supported modes
2023-05-12 14:18:22 +01:00
bjorn c9291d4401 Rename picoNeo3Controller flag to picoController;
It includes Pico 4 as well.
2023-05-12 10:47:47 +01:00
bjorn d18109b6ce Use XR_BD_controller_interaction for Pico Neo 3 input;
Replaces nonstandard interaction profile.  Removed thumbrest paths and
applied menu to both hands, to align with the published extension.
2023-05-04 19:06:51 -07:00
bjorn 07276f9351 Fix Pass:setClear color space and headset background; 2023-05-03 16:35:09 -07:00
bjorn 452ee5c7c6 Pass rework;
Pass stores draw commands rather than sending them to Vulkan
immediately.

The main motivation is to allow more flexibility in the Lua API.  Passes
are now regular objects, aren't invalidated whenever submit is called,
and can cache their draws across multiple frames.  Draws can also be
internally culled, sorted, and batched.

Some API methods (tallies) are missing, and there are still some bugs to
fix, notably with background color.
2023-05-02 00:06:01 -07:00
bjorn 24a68ba648 OpenXR: Add an epoch so headset time starts at zero;
32-bit float precision can't handle huge XrTimes.
2023-05-01 19:09:35 -07:00
bjorn f96b915767 OpenXR: lastDisplayTime should be an XrTime; 2023-05-01 19:09:33 -07:00
bjorn f370da90d5 OpenXR: Always return a valid view count;
View count is well-defined to be 2 with the current view configuration,
and people should be able to rely on getViewCount even before the views
are tracked.  It returns the number of views in the view configuration,
not the number of views with valid data.
2023-05-01 18:59:15 -07:00
bjorn 784440f5cb OpenXR: Handle zero timestamps; Handle tracking loss better;
- If timestamp is zero (before .update is called), return empty data
  instead of erroring.
- Check for valid position/orientation separately, and return empty data
  for anything that's invalid.  Previously both position/orientation
  were used if either was valid, which returns undefined results.
2023-05-01 18:49:59 -07:00
bjorn 9722800d67 Fix blend mode merge; 2023-03-30 19:51:59 -07:00
bjorn 6bca4663ee Merge branch 'master' into dev 2023-03-30 19:51:38 -07:00
bjorn 7b6618310a Fix blend mode merge; 2023-03-30 19:51:17 -07:00
bjorn e9c79417c7 Merge branch 'master' into dev 2023-03-30 19:40:39 -07:00
bjorn 7f5ab081f5 Use runtime preferred environment blend mode; 2023-03-30 19:39:50 -07:00
bjorn 2ad2fd6d90 OpenXR: Improve error messages;
- Error messages say what went wrong instead of file/line
- Instead of silently failing during startup, log a warning
2023-03-07 20:16:59 -08:00
bjorn aba5f328fe Throttle when OpenXR session is idle; 2023-03-02 19:33:35 -08:00
bjorn abbc6a6dc6 Merge branch 'master' into dev 2023-02-21 21:12:33 -08:00
bjorn 89edccbf4c Add lovr.headset.isPassthroughEnabled and lovr.headset.setPassthroughEnabled; 2023-02-05 19:51:12 -08:00
bjorn fbc591802a Details; 2023-02-01 19:26:18 -08:00
bjorn 66cb43a665 Support elbow poses from hand tracking;
Via XR_ULTRALEAP_hand_tracking_forearm
2023-02-01 18:36:05 -08:00
bjorn bf31072d0d Cleanup; 2023-01-30 19:44:23 -08:00
Ilya Chelyadin d84d358de7 Minor fixes 2023-01-31 06:03:53 +03:00
Ilya Chelyadin f0265a6f48 Disable headless OpenXR extension for Android 2023-01-29 23:45:23 +03:00
bjorn 4675dfb3e9 Fix build; 2023-01-18 18:21:53 -08:00
Ilya Chelyadin 48aad15b1f Fix comma 2022-12-08 07:12:59 +03:00
Ilya Chelyadin f62c99e469 Fix typos, indentation, minor issues 2022-12-08 07:05:30 +03:00
Bjorn 78a70670bb
Merge branch 'dev' into MSFT_controller_model 2022-12-03 19:34:49 -08:00
Ilya 92c136bc73
Merge branch 'bjornbytes:master' into picofix 2022-12-01 21:20:33 +03:00
bjorn f9d7742dfd Add support for headless headset rendering;
Although the name is unfortunate, this allows access to lovr.headset
when no window is opened or when the graphics module is disabled.  This
requires the XR_MND_headless extension to be supported by the runtime.
2022-11-26 14:40:39 -08:00
Ilya Chelyadin 13d8c4a207 Interaction profiles suggestion improvement
At least one profile should be supported. Monado fails on Neo 3 profile.
2022-11-25 21:16:42 +03:00
Ilya Chelyadin 3f20364c3f Pico is back!
Tested on Pico Neo 3 with PUI v4.9.3
Also included generic (Monado-Android) Android flavor.
2022-11-22 22:01:13 +03:00
s-ol 043f9c7920 store headset model metadata for animations 2022-11-22 12:24:57 +01:00
s-ol 3f8e137469 implement XR_MSFT_controller_model 2022-11-22 12:24:25 +01:00
bjorn 6d1bbe9c5c Fix Android build on new NDKs;
Some Android header defines DEPTH, which clashes with a symbol in the
OpenXR driver.  This change just stops using Android headers in there
and declares more granular private functions.  It also removes a few
unused private os functions.
2022-11-15 20:35:39 -08:00
Josip Miskovic 9b6e884f7f Remove problematic bindings from Index controller
The "system" button on Valve Index controller may not be exposed to
applications through OpenXR. Oculus runtime throws error when binding
for that button is attempted.
2022-10-18 21:50:48 -07:00
bjorn 0d7ed04789 Fix Quest pinch axis; 2022-10-02 14:00:52 -07:00
bjorn b5620fb185 Revert "Fix Quest hand model orientation;"
This reverts commit a766bf4a35.
2022-09-26 14:58:34 -07:00
bjorn a766bf4a35 Fix Quest hand model orientation; 2022-09-23 17:52:21 -07:00
bjorn d2ceb6b81a Fix skeletal animation on some GPUs;
The animation compute shader was not specializing the workgroup size
properly, so it was only working on GPUs with a subgroup size of 32.

The Quest 1 has a subgroup size of 32 and the Quest 2 has a subgroup
size of 64, so this resulted in hand models breaking on Quest 2 only!
2022-09-23 14:36:20 -07:00
bjorn 311d1511bc Fix quest keyboard tracking; 2022-09-21 14:58:30 -07:00
bjorn ece73be868 lovr.headset.getPose works with keyboard device on Quest; 2022-09-20 20:16:58 -07:00
bjorn d1b6bd3d15 OpenXR: fall back to d24s8 when d32fs8 isn't supported;
Window was already doing this.

Quest currently doesn't work with stencil = true because of this.
2022-09-20 19:09:04 -07:00
bjorn 6444aba832 OpenXR: Map Index system buttons to menu;
SteamVR doesn't expose these, but monado does, so might as well bind them.
2022-09-14 21:35:43 -07:00