Compare commits

...
Author SHA1 Message Date
Vindicus999 079d760740 Merge remote-tracking branch 'upstream/master' 2026-01-07 01:59:39 +00:00
Patrick Nicolas 7870cc6484 fix typo in configuration doc 2026-01-06 21:28:06 +01:00
Patrick Nicolas 43bbb8b0f8 Add check for 10 bit GPU image support 2026-01-06 18:48:47 +01:00
Cláudio 'Patola' Sampaio 2c9928db63 12 strings translated to pt-br 2026-01-06 18:30:16 +01:00
Patrick Nicolas 81363b3602 FR locale 2026-01-06 17:57:54 +01:00
Patrick Nicolas a291226a46 Add About page 2026-01-06 17:57:54 +01:00
Patrick Nicolas 2e1e5571d6 Left align server/headset info 2026-01-06 17:57:54 +01:00
Patrick Nicolas d6768d59a7 Rework dashboard main page 2026-01-06 17:57:54 +01:00
Patrick Nicolas 12cddd4d6f Add connected headset SystemName property in dbus 2026-01-06 13:07:32 +01:00
Cláudio 'Patola' Sampaio b284daca6a Translated 1 message to pt-br 2026-01-06 11:25:05 +01:00
Francesco d4854d77b0 Fix pipewire sink setup (#717) 2026-01-06 10:28:01 +01:00
Vindicus999 35eb409403 Merge remote-tracking branch 'upstream/master' 2026-01-06 02:00:07 +00:00
InconsolableCellist caba985ce1 705: Add version number to main tab (#719) 2026-01-05 22:05:35 +01:00
Patrick Nicolas 26bdd6e85b Ensure proper configuration is loaded in Main page 2026-01-05 15:53:17 +01:00
Vindicus999 b725f95a55 Merge remote-tracking branch 'upstream/master' 2026-01-04 02:10:02 +00:00
InconsolableCellist 867c78d826 Fix infinite loop in find_dir when reaching root directory (#708)
The previous loop condition `not copy.empty()` would never terminate
at the filesystem root since root paths (e.g., "/" or "C:\") are never
empty and their parent_path() returns themselves.
2026-01-03 13:10:56 +01:00
Vindicus999 7e33152f43 Merge remote-tracking branch 'upstream/master' 2026-01-02 02:00:17 +00:00
Patrick Nicolas 1e488a8a9c Prevent going back after first page 2026-01-01 23:03:18 +01:00
Patrick Nicolas 6be85971ea Fix invisible buttons when going back 2026-01-01 23:03:18 +01:00
Patrick Nicolas fe8c320d67 Revert "Fix pipewire sink setup (#716)"
This reverts commit eb99b474ae.
2026-01-01 22:09:43 +01:00
Francesco eb99b474ae Fix pipewire sink setup (#716) 2026-01-01 18:46:25 +01:00
Rose/Wren 857e5fce2c Fix glm hash after repacking 2026-01-01 10:17:55 +01:00
Vindicus999 c381a0a6d6 Merge remote-tracking branch 'upstream/master' 2026-01-01 02:08:47 +00:00
BERADQ f383eb8e8d Update Simplified Chinese localization -> close #599 2025-12-31 11:35:09 +01:00
Sapphire a3c7a604e0 Pass session and stop token through reconnect flow 2025-12-31 00:59:36 -06:00
Sapphire 416297f232 Change refresh rate and bitrate on connect 2025-12-31 00:59:36 -06:00
Sapphire 205c84b273 Don't listen to stdin in accept_connection
Fixes reconnect when server is spawned by systemd
2025-12-31 00:59:36 -06:00
Sapphire 727d4fab4d Use ipc_server_stop to exit during reconnect 2025-12-31 00:59:33 -06:00
Vindicus999 633c696a80 Merge remote-tracking branch 'upstream/master' 2025-12-31 01:58:42 +00:00
Sapphire 21c04be1f8 Transition app to STOPPING state on requested app quit 2025-12-30 05:21:34 -06:00
Sapphire 08ebe00a4d Update monado 2025-12-30 05:21:34 -06:00
Sapphire 1c3b6dd2e3 Update monado 2025-12-30 05:21:34 -06:00
Sapphire 9df93b2cad Update monado 2025-12-30 05:21:34 -06:00
Cláudio 'Patola' Sampaio 1ec4340c74 Added 5 new strings, corrected an older one 2025-12-30 09:32:09 +01:00
Vindicus999 ea56845aea Merge remote-tracking branch 'upstream/master' 2025-12-30 01:58:04 +00:00
Patrick Nicolas 6356f37f4d Remove outdated build informations 2025-12-29 20:21:17 +01:00
Patrick Nicolas c217577b81 CI: cache git clones too 2025-12-29 18:11:59 +01:00
Patrick Nicolas ea7ab55198 Fix software encoding configuration 2025-12-29 18:03:09 +01:00
Patrick Nicolas 01bc6e8804 FR, IT locales 2025-12-29 15:56:57 +01:00
Patrick Nicolas 0393f7cb07 Extended configuration value toggle 2025-12-29 15:56:57 +01:00
Patrick Nicolas e41410bcc9 Hide unsupported features in lobby config 2025-12-29 15:56:57 +01:00
Patrick Nicolas dce89d655f Replace stream resolution with foveation 2025-12-29 15:56:57 +01:00
Vindicus999 331b2e875c Merge remote-tracking branch 'upstream/master' 2025-12-29 02:06:30 +00:00
Sawkez 832df65d17 Add controller offsets for Pico Neo 3 (#696) 2025-12-28 20:23:59 +00:00
Patrick Nicolas d1d6c343a3 Update xrizer to 0.4 2025-12-28 09:43:40 +00:00
Vindicus999 36b4da49e8 Merge remote-tracking branch 'upstream/master' 2025-12-27 01:55:04 +00:00
Sapphire 3df615cb8a Fix nvenc build without vaapi 2025-12-26 19:43:58 -06:00
Vindicus999 04507e36f6 Merge remote-tracking branch 'upstream/master' 2025-12-23 01:57:36 +00:00
Patrick Nicolas 2e1ed8d87e Add README section about application list 2025-12-22 20:48:35 +01:00
akazdayo 9d8f64e6f2 fix: translation typo 'thumbstick' 2025-12-22 10:29:26 +01:00
Vindicus999 3a442d3a87 Merge remote-tracking branch 'upstream/master' 2025-12-22 02:02:10 +00:00
Sapphire da9392c791 Enable local dimming 2025-12-21 13:54:14 -06:00
Patrick Nicolas 291ab85bd6 remove some leftover bitrates in docs 2025-12-21 15:21:41 +01:00
Sapphire 1e2823c019 Remove simple_controller binding for hand interaction 2025-12-21 12:04:19 +01:00
Vindicus999 d9884014e6 Merge remote-tracking branch 'upstream/master' 2025-12-21 02:02:56 +00:00
peelz 1a35e1f7fc Add SolarXR support 2025-12-20 21:01:09 +01:00
Patrick Nicolas f4c4021e20 Fix build with old vulkan_hpp 2025-12-20 18:50:12 +01:00
Patrick Nicolas 6fc48c7d4f Fix crash on "start by USB" 2025-12-20 08:32:03 +01:00
Vindicus999 5370d24789 Merge remote-tracking branch 'upstream/master' 2025-12-20 01:50:05 +00:00
Guillaume Meunier 52eef0e02e Fix christmas logo shading 2025-12-19 20:27:06 +01:00
Patrick Nicolas 2095ab6f7e Prepare 25.12 release 2025-12-19 11:33:52 +01:00
Sapphire 65a02bb04f Fix setting active runtime in Flatpak 2025-12-19 02:24:13 -06:00
Vindicus999 83f00ebcf0 Merge remote-tracking branch 'upstream/master' 2025-12-18 01:53:10 +00:00
Patrick Nicolas fc6fcda0cd Default to power saving on Quests only 2025-12-17 22:58:27 +01:00
Vindicus999 d407368f64 Merge remote-tracking branch 'upstream/master' 2025-12-17 01:52:42 +00:00
Patrick Nicolas 366792cf46 Mention xrizer in readme, tweak Steam flatpak info 2025-12-16 23:31:20 +01:00
Patrick Nicolas a1f186eb23 Hide avahi not installed warning if it's running
This may happen if we don't have permissions to read files, but the
daemon is available through dbus
2025-12-16 23:15:52 +01:00
Patrick Nicolas 8940220fc2 Add support for per-ABI OpenXR manifest 2025-12-16 23:11:28 +01:00
Patrick Nicolas 4c2e24536d Enable lighthouse by default 2025-12-16 21:40:09 +01:00
Guillaume Meunier 172ef89dea Add christmas logo 2025-12-16 21:27:34 +01:00
Patrick Nicolas bb4d12ef33 Fix plot labels translations
They wouldn't change on settings changes
2025-12-16 17:26:13 +01:00
Vindicus999 4afb3b5786 Merge remote-tracking branch 'upstream/master' 2025-12-16 01:57:09 +00:00
Guillaume Meunier 06ad530e2f Use vertex colors, use normal maps 2025-12-15 19:00:23 +01:00
Guillaume Meunier a32a4e4182 Don't display an error message when cancelling a file picking operation 2025-12-15 19:00:23 +01:00
Guillaume Meunier 5329bfd28c Add missing vibes 2025-12-15 19:00:23 +01:00
BlackCherryCat e4df4191ce Update es locale 2025-12-15 17:28:39 +01:00
galister f89606f8a9 building.md: Lighthouse driver
Add Lighthouse driver support for lighthouse-tracked devices and mention absolute paths in OpenXR runtime manifest.
2025-12-15 17:03:25 +01:00
Patrick Nicolas d43d864dee Prevent assertion failure in nvenc probe 2025-12-15 14:28:51 +01:00
mitsuami-megane 2b9e267fc8 add instructions to help with steamvr_lh confusion 2025-12-15 11:00:34 +01:00
Mitsuami 24faf2cd3b update ja locale (#674) 2025-12-15 05:17:57 +00:00
Vindicus999 18457b8e9b Merge remote-tracking branch 'upstream/master' 2025-12-15 02:00:30 +00:00
BERADQ 8e7192c767 Update Simplified Chinese localization -> close #599 2025-12-14 13:45:38 +01:00
Patrick Nicolas 2585754497 Update OpenXR to 1.1.54 2025-12-14 10:06:50 +01:00
Vindicus999 3d3b712ba0 Merge remote-tracking branch 'upstream/master' 2025-12-14 02:03:17 +00:00
Guillaume Meunier c16478b940 aim_left and aim_right don't need offsets anymore on Quest 3 when using OpenXR 1.1.53 2025-12-13 17:16:39 +01:00
Cláudio 'Patola' Sampaio c0532ce6e4 Translated 3 new messages to pt_BR 2025-12-13 13:59:57 +01:00
Patrick Nicolas ba3d582c92 IT locale 2025-12-13 11:28:30 +01:00
Patrick Nicolas 741298be97 FR locale 2025-12-13 11:28:30 +01:00
Patrick Nicolas e6e32ce39d Move application configuration in settings 2025-12-13 11:28:30 +01:00
Patrick Nicolas 0d865ffc14 Start server after avahi "fix it" 2025-12-13 11:28:30 +01:00
Patrick Nicolas e46c317f87 Add link to db.vronlinux.org in troubleshoot 2025-12-13 11:28:30 +01:00
Patrick Nicolas 340c0d546b Remove autostart application from wizard 2025-12-13 11:28:30 +01:00
Patrick Nicolas ad31a8dfcc Add USB tooltip in wizard 2025-12-13 11:28:30 +01:00
Vindicus999 67e2627116 Merge remote-tracking branch 'upstream/master' 2025-12-13 01:50:11 +00:00
BERADQ e1d5f0e636 Update Simplified Chinese localization -> close #599 2025-12-12 19:08:11 +01:00
marcin.mirski 225a0db69e Add STATUS mode to mode-less CMake message commands 2025-12-12 08:15:00 +01:00
Sapphire f340dc5940 Don't patch pinch_ext or pose_ext into non-controller interaction profiles 2025-12-11 22:59:05 -06:00
Vindicus999 06bd4e430a Merge remote-tracking branch 'upstream/master' 2025-12-12 01:56:25 +00:00
Cláudio 'Patola' Sampaio 2057aff195 Updated stream/foveation strings in pt_BR 2025-12-11 15:50:31 +01:00
Patrick Nicolas 7587b6ae84 Remove codec and bit-depth configuration from GUI 2025-12-11 13:42:16 +01:00
Patrick Nicolas 5a669e71f5 Allow simple string for encoder configuration 2025-12-11 13:42:16 +01:00
Sapphire 6f32f049d7 Add codec and 10-bit config in headset 2025-12-11 13:42:16 +01:00
Patrick Nicolas 9b4a26b5a8 Default stream resolution based on eye tracking 2025-12-10 14:32:44 +01:00
Patrick Nicolas db345c832d remove bit-depth for automatic codec 2025-12-10 14:32:05 +01:00
Patrick Nicolas 0b526cef9d configure bitrate on client only 2025-12-10 14:32:01 +01:00
Patrick Nicolas e0cbd202a8 stream resolution (foveation) config in headset 2025-12-10 14:30:40 +01:00
Patrick Nicolas b2f3b925d9 Prefer h265 over h264 2025-12-10 14:00:47 +01:00
Patrick Nicolas 5ab7731be3 Remove server foveation config, rework defaults 2025-12-10 14:00:47 +01:00
Patrick Nicolas 5c50b9a1ad WIP: fixed encoder layout 2025-12-10 14:00:47 +01:00
Vindicus999 375cced814 Merge remote-tracking branch 'upstream/master' 2025-12-10 01:55:41 +00:00
Patrick Nicolas bf811ac65d add obsolete interaction profile bindings 2025-12-09 17:49:31 +01:00
BERADQ 099d68a83d Update Simplified Chinese localization -> close #599 2025-12-09 15:35:47 +01:00
Sapphire db622b4252 Derive pinch and poke poses for non hand_interaction profiles from grip 2025-12-09 04:10:40 -05:00
Sapphire 6638cefb37 Unify wivrn_controller and wivrn_hand_interaction device code 2025-12-09 04:10:40 -05:00
Sapphire 740dcfdcfb Add poke_ext and pinch_ext poses to all profiles 2025-12-09 04:10:40 -05:00
Vindicus999 46d06413f7 Merge remote-tracking branch 'upstream/master' 2025-12-09 01:53:51 +00:00
perillamint 281dd6000e Fix GalaxyXR controller offset
Fix GalaxyXR controller offset to controller model properly overlap the
passthrough image
2025-12-08 15:05:29 +01:00
Guillaume Meunier bd907d8496 Add Pico 4 Ultra controller model 2025-12-08 14:59:35 +01:00
Guillaume Meunier 854e4c7b57 Download controller models at compile time, add Samsung Galaxy XR controller 2025-12-08 14:59:35 +01:00
Vindicus999 c2c4978275 Merge remote-tracking branch 'upstream/master' 2025-12-08 01:54:49 +00:00
Cláudio 'Patola' Sampaio e394cb0dcb updated 4 pt_BT strings 2025-12-07 17:47:04 +01:00
Sapphire 4553379d74 Hide GUI and use thumbstick for in-stream bitrate adjustment 2025-12-07 09:32:02 -05:00
Sapphire ca45eed21e Change stream GUI bitrate step size to 10% 2025-12-07 09:32:02 -05:00
Sapphire fad0a8feee In-stream GUI bitrate adjustment 2025-12-07 09:32:02 -05:00
Sapphire bb07e5afd7 Change resolution scale step size to 10% 2025-12-07 09:32:02 -05:00
Vindicus999 694def436c Merge remote-tracking branch 'upstream/master' 2025-12-07 02:02:34 +00:00
Guillaume Meunier 0a2c374b52 Update imgui and entt 2025-12-06 19:56:42 +01:00
Patrick Nicolas fadaf7600a Remove more unused symbols in Android build 2025-12-06 19:24:18 +01:00
Patrick Nicolas afc9766840 Fix pink image on Intel GPUs
Somehow under spir-V 1.3 it behaves as if each shader is executed twice
2025-12-06 16:47:41 +01:00
Vindicus999 e01f5326c4 Merge remote-tracking branch 'upstream/master' 2025-12-06 01:47:37 +00:00
Sapphire 2c7812069e Mention PRESSURE_VESSEL_IMPORT_OPENXR_1_RUNTIMES in steamvr docs page 2025-12-05 14:36:21 +01:00
Sapphire 007aed6310 Mention xrizer in steamvr docs page 2025-12-05 14:36:21 +01:00
Sapphire aef6c1bced Handle assignment of ANY_HAND_CONTROLLER devices from steamvr_lh 2025-12-05 09:39:55 +01:00
Sapphire 8874ea8753 Properly handle switching interaction profiles on controller disconnection 2025-12-05 09:37:57 +01:00
Vindicus999 7a6c53acf0 Merge remote-tracking branch 'upstream/master' 2025-12-05 01:53:53 +00:00
BERADQ d1308bfbb8 Update IDR handler to explicitly handle dropped IDR frames and ignore dropped non-reference frames. 2025-12-04 15:59:18 +01:00
BERADQ a37498eedf Optimize NVENC encoding configuration 2025-12-04 15:53:34 +01:00
Sapphire 24380867d4 Fix lobby GUI crashing on PC 2025-12-04 11:16:31 +01:00
Sapphire f2a202f29d Use std::ranges::copy for copying tracking data in face trackers 2025-12-04 11:16:31 +01:00
Sapphire 831bdf7a29 Return proper sample_time_ns in face trackers 2025-12-04 11:16:31 +01:00
Sapphire 53d94d6c04 Log unsupported input requests on face trackers 2025-12-04 11:16:31 +01:00
Sapphire b1aaeb78e8 Return XRT_ERROR_INPUT_UNSUPPORTED for unsupported input in trackers 2025-12-04 11:16:31 +01:00
Sapphire 51d8742029 Forward XR_ANDROID_face_tracking 2025-12-04 11:16:31 +01:00
Sapphire ac0a926811 Update to OpenXR 1.1.53 2025-12-04 11:16:31 +01:00
Sapphire a4e5475ff7 Update monado 2025-12-04 11:16:31 +01:00
Sapphire 804f85e7b8 Update monado 2025-12-04 11:16:31 +01:00
Sapphire eadd9a1813 Update monado 2025-12-04 11:16:31 +01:00
Sapphire f0ab1284f3 Update monado 2025-12-04 11:16:31 +01:00
Sapphire fc4a2bf49d Update monado 2025-12-04 11:16:31 +01:00
Sapphire e94901043b Update monado 2025-12-04 11:16:31 +01:00
Sapphire 3cf46e03e3 Update monado 2025-12-04 11:16:31 +01:00
Guillaume Meunier f12ebe14bc Fix assertion failure when reading controller state for imgui 2025-12-04 08:50:51 +01:00
Patrick Nicolas 85cde18718 Handle mismatched frames more gracefully
Use pose/fov/foveation from views individually, in case of dropped
frames, data may be different per eye
2025-12-04 07:59:49 +01:00
Patrick Nicolas 23b643422b fix ffmpeg handling of dropped frames 2025-12-04 07:43:20 +01:00
Vindicus999 dd7be5c830 Merge remote-tracking branch 'upstream/master' 2025-12-04 01:53:49 +00:00
Cláudio 'Patola' Sampaio c183857113 translated 3 new msgs to pt_br 2025-12-03 20:08:25 +01:00
BERADQ c05104ba82 Update Simplified Chinese localization -> close #599 2025-12-03 14:32:13 +01:00
Patrick Nicolas 9eb3ecb4d5 Revert "Download monado by URL instead of git"
This reverts commit feecb97214.
Applying patches is more fragile when working on plain directories.
2025-12-03 11:21:34 +01:00
182 changed files with 7387 additions and 7433 deletions
+5 -1
View File
@@ -53,6 +53,8 @@ jobs:
${{github.workspace}}/cmake-fetch/*-subbuild/*-populate-prefix/src/*.tar.*
${{github.workspace}}/cmake-fetch/*-subbuild/*-populate-prefix/src/*.zip
${{github.workspace}}/cmake-fetch/*.tar.*
${{github.workspace}}/cmake-fetch/*.tgz
${{github.workspace}}/cmake-fetch/*-src/.git
restore-keys: cmake-linux-
- name: Install dependencies
@@ -119,7 +121,7 @@ jobs:
- name: Prepare
run: |
apt-get update
apt-get install --yes curl wget sudo jq cmake gcc g++ git pkgconf libboost-all-dev libkirigami-dev gettext libarchive-dev nlohmann-json3-dev qcoro-qt6-dev libkf6i18n-dev libkf6coreaddons-dev libkf6qqc2desktopstyle-dev libkf6iconthemes-dev libvulkan-dev libssl-dev librsvg2-dev extra-cmake-modules
apt-get install --yes curl wget sudo jq cmake gcc g++ git pkgconf libboost-all-dev libkirigami-dev gettext libarchive-dev nlohmann-json3-dev qcoro-qt6-dev libkf6i18n-dev libkf6coreaddons-dev libkf6qqc2desktopstyle-dev libkf6iconthemes-dev libvulkan-dev libssl-dev librsvg2-dev extra-cmake-modules qml6-module-org-kde-kirigamiaddons-formcard
- uses: actions/cache@v4
with:
@@ -128,6 +130,7 @@ jobs:
${{github.workspace}}/cmake-fetch/*-subbuild/*-populate-prefix/src/*.tar.*
${{github.workspace}}/cmake-fetch/*-subbuild/*-populate-prefix/src/*.zip
${{github.workspace}}/cmake-fetch/*.tar.*
${{github.workspace}}/cmake-fetch/*.tgz
restore-keys: cmake-linux-
- name: Configure CMake
@@ -230,6 +233,7 @@ jobs:
${{github.workspace}}/cmake-fetch/*-subbuild/*-populate-prefix/src/*.zip
${{github.workspace}}/cmake-fetch/*.tar.*
${{github.workspace}}/cmake-fetch/*.zip
${{github.workspace}}/cmake-fetch/*.tgz
restore-keys: cmake-android-
- name: Install dependencies
+27 -24
View File
@@ -54,8 +54,8 @@ set(OVR_COMPAT_SEARCH_PATH "/opt/xrizer:/usr/local/lib/OpenComposite:/usr/lib/Op
option(WIVRN_FEATURE_DEBUG_GUI "Enable Monado debug GUI" OFF)
option(WIVRN_FEATURE_RENDERDOC "Support renderdoc" OFF)
set(WIVRN_FEATURE_SOLARXR OFF) # Will be added back when merged in upstream Monado
option(WIVRN_FEATURE_STEAMVR_LIGHTHOUSE "Enable SteamVR Lighthouse driver" OFF)
option(WIVRN_FEATURE_SOLARXR "Enable SolarXR driver" ON)
option(WIVRN_FEATURE_STEAMVR_LIGHTHOUSE "Enable SteamVR Lighthouse driver" ON)
set(WIVRN_CSS "${CMAKE_SOURCE_DIR}/images/wivrn-local.css" CACHE STRING "Stylesheet to use to render SVGs" )
@@ -67,6 +67,7 @@ set(WIVRN_OPENXR_MANIFEST_TYPE "relative" CACHE STRING "How to reference librari
if (NOT WIVRN_OPENXR_MANIFEST_TYPE IN_LIST WIVRN_OPENXR_MANIFEST_TYPE_VALUES)
message(FATAL_ERROR "WIVRN_OPENXR_MANIFEST_TYPE must be one of ${WIVRN_OPENXR_MANIFEST_TYPE_VALUES}")
endif()
option(WIVRN_OPENXR_MANIFEST_ABI "Generate an ABI specific OpenXR manifest")
option(ENABLE_COLOURED_OUTPUT "Always produce ANSI-coloured output (GNU/Clang only)." ON)
@@ -199,7 +200,7 @@ if (WIVRN_BUILD_CLIENT AND NOT ANDROID)
find_package(Fontconfig REQUIRED)
if (WIVRN_USE_SYSTEM_OPENXR)
find_package(OpenXR 1.1.48 REQUIRED)
find_package(OpenXR 1.1.53 REQUIRED)
endif()
if (WIVRN_USE_SYSTEM_LIBKTX)
@@ -216,7 +217,7 @@ endif()
if (WIVRN_BUILD_DISSECTOR)
if (WIVRN_USE_SYSTEM_OPENXR)
find_package(OpenXR 1.1.48 REQUIRED)
find_package(OpenXR 1.1.53 REQUIRED)
endif()
find_package(Wireshark REQUIRED)
endif()
@@ -238,9 +239,9 @@ FetchContent_Declare(simdjson EXCLUDE_FROM_ALL SYSTEM URL https://github.co
FetchContent_Declare(fastgltf EXCLUDE_FROM_ALL SYSTEM URL https://github.com/spnda/fastgltf/archive/refs/tags/v0.9.0.tar.gz
URL_HASH SHA256=0bb564e127b14c22f062db50f89381dd2e0a20dbaf4987ca138a4ae8728712f9)
FetchContent_Declare(glm EXCLUDE_FROM_ALL SYSTEM URL https://github.com/g-truc/glm/releases/download/1.0.2/glm-1.0.2.zip
URL_HASH SHA256=a41adf423315e35489c1e67689c7bb74c7edd4d207a477b7b19c45cd440c2f67)
FetchContent_Declare(openxr_loader EXCLUDE_FROM_ALL SYSTEM URL https://github.com/KhronosGroup/OpenXR-SDK/archive/refs/tags/release-1.1.48.tar.gz
URL_HASH SHA256=c9372992dcdfac643e28796e41d4dbd36c4cdf0388d01fa89245628edae9d411)
URL_HASH SHA256=203b64abc82e4d8697cc5aeedc93117fc1ee52d36e7cdcfc0854fa2c607edaae)
FetchContent_Declare(openxr_loader EXCLUDE_FROM_ALL SYSTEM URL https://github.com/KhronosGroup/OpenXR-SDK/archive/refs/tags/release-1.1.54.tar.gz
URL_HASH SHA256=2055688081066e37238be996534f349420ac52ed34f8514836704232121ee7f3)
FetchContent_Declare(spdlog EXCLUDE_FROM_ALL SYSTEM URL https://github.com/gabime/spdlog/archive/refs/tags/v1.16.0.tar.gz
URL_HASH SHA256=8741753e488a78dd0d0024c980e1fb5b5c85888447e309d9cb9d949bdb52aa3e)
FetchContent_Declare(stb EXCLUDE_FROM_ALL SYSTEM URL https://github.com/nothings/stb/archive/013ac3beddff3dbffafd5177e7972067cd2b5083.zip
@@ -253,14 +254,14 @@ FetchContent_Declare(libktx EXCLUDE_FROM_ALL SYSTEM URL https://github.co
FetchContent_Declare(implot EXCLUDE_FROM_ALL SYSTEM URL https://github.com/epezent/implot/archive/3da8bd34299965d3b0ab124df743fe3e076fa222.zip
URL_HASH SHA256=e9b439a94aa6f09fcf12ed9c2cd784efe5e99e96242122aa683e690b29f7a59f)
file(GLOB IMGUI_PATCHES CONFIGURE_DEPENDS patches/imgui/*)
FetchContent_Declare(imgui EXCLUDE_FROM_ALL SYSTEM URL https://github.com/ocornut/imgui/archive/refs/tags/v1.92.4.tar.gz
URL_HASH SHA256=0e175d4d941112532549b418ced0bd546abe9024ecb9b5f431f8a67a2197b0ba
FetchContent_Declare(imgui EXCLUDE_FROM_ALL SYSTEM URL https://github.com/ocornut/imgui/archive/refs/tags/v1.92.5.tar.gz
URL_HASH SHA256=0eb50fe9aeba1a51f96b5843c7f630a32ed2e9362d693c61b87e4fa870cf826d
PATCH_COMMAND ${CMAKE_CURRENT_LIST_DIR}/patches/apply.sh ${IMGUI_PATCHES}
)
FetchContent_Declare(uni-algo EXCLUDE_FROM_ALL SYSTEM URL https://github.com/uni-algo/uni-algo/archive/v1.2.0.tar.gz
URL_HASH SHA256=f2a1539cd8635bc6088d05144a73ecfe7b4d74ee0361fabed6f87f9f19e74ca9)
FetchContent_Declare(entt EXCLUDE_FROM_ALL SYSTEM URL https://github.com/skypjack/entt/archive/refs/tags/v3.15.0.tar.gz
URL_HASH SHA256=01466fcbf77618a79b62891510c0bbf25ac2804af5751c84982b413852234d66)
FetchContent_Declare(entt EXCLUDE_FROM_ALL SYSTEM URL https://github.com/skypjack/entt/archive/refs/tags/v3.16.0.tar.gz
URL_HASH SHA256=7d7b4037b737992342049ffab14f22fa10243e01664f8c3a0657aa247ac52f71)
FetchContent_Declare(curl EXCLUDE_FROM_ALL SYSTEM URL https://github.com/curl/curl/releases/download/curl-8_17_0/curl-8.17.0.tar.xz
URL_HASH SHA256=955f6e729ad6b3566260e8fef68620e76ba3c31acf0a18524416a185acf77992)
FetchContent_Declare(spirv-reflect EXCLUDE_FROM_ALL SYSTEM URL https://github.com/KhronosGroup/SPIRV-Reflect/archive/refs/tags/vulkan-sdk-1.4.328.1.tar.gz
@@ -271,7 +272,9 @@ set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS monado-rev)
file(STRINGS monado-rev MONADO_REV)
# Server dependencies
FetchContent_Declare(monado
URL https://gitlab.freedesktop.org/monado/monado/-/archive/${MONADO_REV}/monado-${MONADO_REV}.tar.gz
GIT_REPOSITORY https://gitlab.freedesktop.org/monado/monado.git
# The flatpak manifest is updated automatically
GIT_TAG ${MONADO_REV}
PATCH_COMMAND ${CMAKE_CURRENT_LIST_DIR}/patches/apply.sh ${MONADO_PATCHES}
EXCLUDE_FROM_ALL
)
@@ -289,18 +292,18 @@ if (WIVRN_BUILD_SERVER OR WIVRN_BUILD_SERVER_LIBRARY)
add_subdirectory(server)
if (WIVRN_BUILD_SERVER)
message("Selected encoders:")
message("\tNVENC : ${WIVRN_USE_NVENC}")
message("\tVAAPI : ${WIVRN_USE_VAAPI}")
message("\tVulkan: ${WIVRN_USE_VULKAN_ENCODE}")
message("\tx264 : ${WIVRN_USE_X264}")
message("")
message("Audio backends:")
message("\tPipewire : ${WIVRN_USE_PIPEWIRE}")
message("\tPulseaudio: ${WIVRN_USE_PULSEAUDIO}")
message("")
message("Optional features:")
message("\tsystemd: ${WIVRN_USE_SYSTEMD}")
message(STATUS "Selected encoders:")
message(STATUS "\tNVENC : ${WIVRN_USE_NVENC}")
message(STATUS "\tVAAPI : ${WIVRN_USE_VAAPI}")
message(STATUS "\tVulkan: ${WIVRN_USE_VULKAN_ENCODE}")
message(STATUS "\tx264 : ${WIVRN_USE_X264}")
message(STATUS "")
message(STATUS "Audio backends:")
message(STATUS "\tPipewire : ${WIVRN_USE_PIPEWIRE}")
message(STATUS "\tPulseaudio: ${WIVRN_USE_PULSEAUDIO}")
message(STATUS "")
message(STATUS "Optional features:")
message(STATUS "\tsystemd: ${WIVRN_USE_SYSTEMD}")
endif()
endif()
+11 -9
View File
@@ -55,32 +55,34 @@ You can now start an OpenXR application on your computer. For Steam games, you m
You can set an application to be started automatically when you connect your headset in the dashboard settings or [manually](docs/configuration.md#application)
### Application list
When the headset is connected and no XR application is running, it will show an application launcher. Applications in that list are sourced from:
- Steam games that are flagged as VR. Steam may need to be restarted for the list to be updated when new games are installed.
- .desktop files that contain `X-WiVRn-VR` in the `Categories` section. Files are searched in [standard locations](https://specifications.freedesktop.org/desktop-entry/latest/file-naming.html#desktop-file-id) which usually include `~/.local/share/applications` and `/usr/share/applications/`.
### OpenVR and Steam games
The flatpak also includes [OpenComposite](https://gitlab.com/znixian/OpenOVR/), used to translate the OpenVR API used by SteamVR to OpenXR used by WiVRn, see [SteamVR](docs/steamvr.md) for details.
The flatpak also includes [OpenComposite](https://gitlab.com/znixian/OpenOVR/) and [xrizer](https://github.com/Supreeeme/xrizer/), used to translate the OpenVR API used by SteamVR to OpenXR used by WiVRn, see [SteamVR](docs/steamvr.md) for details.
If using Wine/Proton, it will probe for OpenVR at startup, so even for OpenXR applications, OpenComposite is required.
If using Wine/Proton, it will probe for OpenVR at startup, so even for OpenXR applications, OpenComposite or xrizer is required.
When you start the server through flatpak, it will automatically configure the current OpenVR to use OpenComposite.
When you start the server through flatpak, it will automatically configure the current OpenVR to use xrizer.
### Steam Flatpak
If you're using the Steam Flatpak, you'll need to grant read only access to the following paths:
```bash
flatpak override --user \
flatpak override \
--filesystem=xdg-run/wivrn:ro \
--filesystem=xdg-data/flatpak/app/io.github.wivrn.wivrn:ro \
--filesystem=/var/lib/flatpak/app/io.github.wivrn.wivrn:ro \
--filesystem=xdg-config/openxr:ro \
--filesystem=xdg-config/openvr:ro \
com.valvesoftware.Steam
```
Then create a symlink for the OpenXR configuration file (the directory `~/.var/app/com.valvesoftware.Steam/.config/openxr` will need to be created if it doesn't already exist):
```bash
ln -s ~/.config/openxr/1 ~/.var/app/com.valvesoftware.Steam/.config/openxr/1
```
When using a user installation of flatpak Steam, user `override --user` instead of `override`.
### Audio
When the headset is connected, WiVRn will create a virtual output device named WiVRn. It is not selected as default and you should either assign the application to the device when it is running, or mark it as default. To do so you can use `pavucontrol` or your desktop environment's configuration panel. Please note that in `pavucontrol` it will appear as a virtual device.
@@ -1,168 +0,0 @@
{
"profileId": "generic-trigger-squeeze",
"fallbackProfileIds": [],
"layouts": {
"left": {
"selectComponentId": "xr-standard-trigger",
"components": {
"xr-standard-trigger": {
"type": "trigger",
"gamepadIndices": {
"button": 0
},
"rootNodeName": "xr_standard_trigger",
"visualResponses": {
"xr_standard_trigger_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_trigger_pressed_value",
"minNodeName": "xr_standard_trigger_pressed_min",
"maxNodeName": "xr_standard_trigger_pressed_max"
}
}
},
"xr-standard-squeeze": {
"type": "squeeze",
"gamepadIndices": {
"button": 1
},
"rootNodeName": "xr_standard_squeeze",
"visualResponses": {
"xr_standard_squeeze_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_squeeze_pressed_value",
"minNodeName": "xr_standard_squeeze_pressed_min",
"maxNodeName": "xr_standard_squeeze_pressed_max"
}
}
}
},
"gamepadMapping": "xr-standard",
"rootNodeName": "generic-trigger-squeeze-left",
"assetPath": "left.glb"
},
"right": {
"selectComponentId": "xr-standard-trigger",
"components": {
"xr-standard-trigger": {
"type": "trigger",
"gamepadIndices": {
"button": 0
},
"rootNodeName": "xr_standard_trigger",
"visualResponses": {
"xr_standard_trigger_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_trigger_pressed_value",
"minNodeName": "xr_standard_trigger_pressed_min",
"maxNodeName": "xr_standard_trigger_pressed_max"
}
}
},
"xr-standard-squeeze": {
"type": "squeeze",
"gamepadIndices": {
"button": 1
},
"rootNodeName": "xr_standard_squeeze",
"visualResponses": {
"xr_standard_squeeze_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_squeeze_pressed_value",
"minNodeName": "xr_standard_squeeze_pressed_min",
"maxNodeName": "xr_standard_squeeze_pressed_max"
}
}
}
},
"gamepadMapping": "xr-standard",
"rootNodeName": "generic-trigger-squeeze-right",
"assetPath": "right.glb"
},
"none": {
"selectComponentId": "xr-standard-trigger",
"components": {
"xr-standard-trigger": {
"type": "trigger",
"gamepadIndices": {
"button": 0
},
"rootNodeName": "xr_standard_trigger",
"visualResponses": {
"xr_standard_trigger_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_trigger_pressed_value",
"minNodeName": "xr_standard_trigger_pressed_min",
"maxNodeName": "xr_standard_trigger_pressed_max"
}
}
},
"xr-standard-squeeze": {
"type": "squeeze",
"gamepadIndices": {
"button": 1
},
"rootNodeName": "xr_standard_squeeze",
"visualResponses": {
"xr_standard_squeeze_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_squeeze_pressed_value",
"minNodeName": "xr_standard_squeeze_pressed_min",
"maxNodeName": "xr_standard_squeeze_pressed_max"
},
"xr_standard_squeeze_pressed_mirror": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_squeeze_pressed_mirror_value",
"minNodeName": "xr_standard_squeeze_pressed_mirror_min",
"maxNodeName": "xr_standard_squeeze_pressed_mirror_max"
}
}
}
},
"gamepadMapping": "xr-standard",
"rootNodeName": "generic-trigger-squeeze-none",
"assetPath": "none.glb"
}
}
}
Binary file not shown.
@@ -1,286 +0,0 @@
{
"profileId": "htc-vive-focus-3",
"fallbackProfileIds": [
"generic-trigger-squeeze-thumbstick"
],
"layouts": {
"left": {
"selectComponentId": "xr-standard-trigger",
"components": {
"xr-standard-trigger": {
"type": "trigger",
"gamepadIndices": {
"button": 0
},
"rootNodeName": "xr_standard_trigger",
"visualResponses": {
"xr_standard_trigger_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_trigger_pressed_value",
"minNodeName": "xr_standard_trigger_pressed_min",
"maxNodeName": "xr_standard_trigger_pressed_max"
}
}
},
"xr-standard-squeeze": {
"type": "squeeze",
"gamepadIndices": {
"button": 1
},
"rootNodeName": "xr_standard_squeeze",
"visualResponses": {
"xr_standard_squeeze_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_squeeze_pressed_value",
"minNodeName": "xr_standard_squeeze_pressed_min",
"maxNodeName": "xr_standard_squeeze_pressed_max"
}
}
},
"xr-standard-thumbstick": {
"type": "thumbstick",
"gamepadIndices": {
"button": 3,
"xAxis": 2,
"yAxis": 3
},
"rootNodeName": "xr_standard_thumbstick",
"visualResponses": {
"xr_standard_thumbstick_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_pressed_value",
"minNodeName": "xr_standard_thumbstick_pressed_min",
"maxNodeName": "xr_standard_thumbstick_pressed_max"
},
"xr_standard_thumbstick_xaxis_pressed": {
"componentProperty": "xAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_xaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max"
},
"xr_standard_thumbstick_yaxis_pressed": {
"componentProperty": "yAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_yaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max"
}
}
},
"x-button": {
"type": "button",
"gamepadIndices": {
"button": 4
},
"rootNodeName": "x_button",
"visualResponses": {
"x_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "x_button_pressed_value",
"minNodeName": "x_button_pressed_min",
"maxNodeName": "x_button_pressed_max"
}
}
},
"y-button": {
"type": "button",
"gamepadIndices": {
"button": 5
},
"rootNodeName": "y_button",
"visualResponses": {
"y_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "y_button_pressed_value",
"minNodeName": "y_button_pressed_min",
"maxNodeName": "y_button_pressed_max"
}
}
}
},
"gamepadMapping": "xr-standard",
"rootNodeName": "htc-vive-focus-3-left",
"assetPath": "left.glb"
},
"right": {
"selectComponentId": "xr-standard-trigger",
"components": {
"xr-standard-trigger": {
"type": "trigger",
"gamepadIndices": {
"button": 0
},
"rootNodeName": "xr_standard_trigger",
"visualResponses": {
"xr_standard_trigger_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_trigger_pressed_value",
"minNodeName": "xr_standard_trigger_pressed_min",
"maxNodeName": "xr_standard_trigger_pressed_max"
}
}
},
"xr-standard-squeeze": {
"type": "squeeze",
"gamepadIndices": {
"button": 1
},
"rootNodeName": "xr_standard_squeeze",
"visualResponses": {
"xr_standard_squeeze_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_squeeze_pressed_value",
"minNodeName": "xr_standard_squeeze_pressed_min",
"maxNodeName": "xr_standard_squeeze_pressed_max"
}
}
},
"xr-standard-thumbstick": {
"type": "thumbstick",
"gamepadIndices": {
"button": 3,
"xAxis": 2,
"yAxis": 3
},
"rootNodeName": "xr_standard_thumbstick",
"visualResponses": {
"xr_standard_thumbstick_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_pressed_value",
"minNodeName": "xr_standard_thumbstick_pressed_min",
"maxNodeName": "xr_standard_thumbstick_pressed_max"
},
"xr_standard_thumbstick_xaxis_pressed": {
"componentProperty": "xAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_xaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max"
},
"xr_standard_thumbstick_yaxis_pressed": {
"componentProperty": "yAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_yaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max"
}
}
},
"a-button": {
"type": "button",
"gamepadIndices": {
"button": 4
},
"rootNodeName": "a_button",
"visualResponses": {
"a_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "a_button_pressed_value",
"minNodeName": "a_button_pressed_min",
"maxNodeName": "a_button_pressed_max"
}
}
},
"b-button": {
"type": "button",
"gamepadIndices": {
"button": 5
},
"rootNodeName": "b_button",
"visualResponses": {
"b_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "b_button_pressed_value",
"minNodeName": "b_button_pressed_min",
"maxNodeName": "b_button_pressed_max"
}
}
}
},
"gamepadMapping": "xr-standard",
"rootNodeName": "htc-vive-focus-3-right",
"assetPath": "right.glb"
}
}
}
Binary file not shown.
@@ -1,330 +0,0 @@
{
"profileId": "meta-quest-touch-plus",
"fallbackProfileIds": [
"oculus-touch-v3",
"oculus-touch",
"generic-trigger-squeeze-thumbstick"
],
"layouts": {
"left": {
"selectComponentId": "xr-standard-trigger",
"components": {
"xr-standard-trigger": {
"type": "trigger",
"gamepadIndices": {
"button": 0
},
"rootNodeName": "xr_standard_trigger",
"visualResponses": {
"xr_standard_trigger_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_trigger_pressed_value",
"minNodeName": "xr_standard_trigger_pressed_min",
"maxNodeName": "xr_standard_trigger_pressed_max"
}
}
},
"xr-standard-squeeze": {
"type": "squeeze",
"gamepadIndices": {
"button": 1
},
"rootNodeName": "xr_standard_squeeze",
"visualResponses": {
"xr_standard_squeeze_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_squeeze_pressed_value",
"minNodeName": "xr_standard_squeeze_pressed_min",
"maxNodeName": "xr_standard_squeeze_pressed_max"
}
}
},
"xr-standard-thumbstick": {
"type": "thumbstick",
"gamepadIndices": {
"button": 3,
"xAxis": 2,
"yAxis": 3
},
"rootNodeName": "xr_standard_thumbstick",
"visualResponses": {
"xr_standard_thumbstick_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_pressed_value",
"minNodeName": "xr_standard_thumbstick_pressed_min",
"maxNodeName": "xr_standard_thumbstick_pressed_max"
},
"xr_standard_thumbstick_xaxis_pressed": {
"componentProperty": "xAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_xaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max"
},
"xr_standard_thumbstick_yaxis_pressed": {
"componentProperty": "yAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_yaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max"
}
}
},
"x-button": {
"type": "button",
"gamepadIndices": {
"button": 4
},
"rootNodeName": "x_button",
"visualResponses": {
"x_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "x_button_pressed_value",
"minNodeName": "x_button_pressed_min",
"maxNodeName": "x_button_pressed_max"
}
}
},
"y-button": {
"type": "button",
"gamepadIndices": {
"button": 5
},
"rootNodeName": "y_button",
"visualResponses": {
"y_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "y_button_pressed_value",
"minNodeName": "y_button_pressed_min",
"maxNodeName": "y_button_pressed_max"
}
}
},
"thumbrest": {
"type": "button",
"gamepadIndices": {
"button": 6
},
"rootNodeName": "thumbrest",
"visualResponses": {
"thumbrest_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "thumbrest_pressed_value",
"minNodeName": "thumbrest_pressed_min",
"maxNodeName": "thumbrest_pressed_max"
}
}
}
},
"gamepadMapping": "xr-standard",
"rootNodeName": "meta-quest-touch-plus-left",
"assetPath": "left.glb"
},
"right": {
"selectComponentId": "xr-standard-trigger",
"components": {
"xr-standard-trigger": {
"type": "trigger",
"gamepadIndices": {
"button": 0
},
"rootNodeName": "xr_standard_trigger",
"visualResponses": {
"xr_standard_trigger_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_trigger_pressed_value",
"minNodeName": "xr_standard_trigger_pressed_min",
"maxNodeName": "xr_standard_trigger_pressed_max"
}
}
},
"xr-standard-squeeze": {
"type": "squeeze",
"gamepadIndices": {
"button": 1
},
"rootNodeName": "xr_standard_squeeze",
"visualResponses": {
"xr_standard_squeeze_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_squeeze_pressed_value",
"minNodeName": "xr_standard_squeeze_pressed_min",
"maxNodeName": "xr_standard_squeeze_pressed_max"
}
}
},
"xr-standard-thumbstick": {
"type": "thumbstick",
"gamepadIndices": {
"button": 3,
"xAxis": 2,
"yAxis": 3
},
"rootNodeName": "xr_standard_thumbstick",
"visualResponses": {
"xr_standard_thumbstick_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_pressed_value",
"minNodeName": "xr_standard_thumbstick_pressed_min",
"maxNodeName": "xr_standard_thumbstick_pressed_max"
},
"xr_standard_thumbstick_xaxis_pressed": {
"componentProperty": "xAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_xaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max"
},
"xr_standard_thumbstick_yaxis_pressed": {
"componentProperty": "yAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_yaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max"
}
}
},
"a-button": {
"type": "button",
"gamepadIndices": {
"button": 4
},
"rootNodeName": "a_button",
"visualResponses": {
"a_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "a_button_pressed_value",
"minNodeName": "a_button_pressed_min",
"maxNodeName": "a_button_pressed_max"
}
}
},
"b-button": {
"type": "button",
"gamepadIndices": {
"button": 5
},
"rootNodeName": "b_button",
"visualResponses": {
"b_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "b_button_pressed_value",
"minNodeName": "b_button_pressed_min",
"maxNodeName": "b_button_pressed_max"
}
}
},
"thumbrest": {
"type": "button",
"gamepadIndices": {
"button": 6
},
"rootNodeName": "thumbrest",
"visualResponses": {
"thumbrest_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "thumbrest_pressed_value",
"minNodeName": "thumbrest_pressed_min",
"maxNodeName": "thumbrest_pressed_max"
}
}
}
},
"gamepadMapping": "xr-standard",
"rootNodeName": "meta-quest-touch-plus-right",
"assetPath": "right.glb"
}
}
}
@@ -1,330 +0,0 @@
{
"profileId": "meta-quest-touch-pro",
"fallbackProfileIds": [
"oculus-touch-v2",
"oculus-touch",
"generic-trigger-squeeze-thumbstick"
],
"layouts": {
"left": {
"selectComponentId": "xr-standard-trigger",
"components": {
"xr-standard-trigger": {
"type": "trigger",
"gamepadIndices": {
"button": 0
},
"rootNodeName": "xr_standard_trigger",
"visualResponses": {
"xr_standard_trigger_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_trigger_pressed_value",
"minNodeName": "xr_standard_trigger_pressed_min",
"maxNodeName": "xr_standard_trigger_pressed_max"
}
}
},
"xr-standard-squeeze": {
"type": "squeeze",
"gamepadIndices": {
"button": 1
},
"rootNodeName": "xr_standard_squeeze",
"visualResponses": {
"xr_standard_squeeze_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_squeeze_pressed_value",
"minNodeName": "xr_standard_squeeze_pressed_min",
"maxNodeName": "xr_standard_squeeze_pressed_max"
}
}
},
"xr-standard-thumbstick": {
"type": "thumbstick",
"gamepadIndices": {
"button": 3,
"xAxis": 2,
"yAxis": 3
},
"rootNodeName": "xr_standard_thumbstick",
"visualResponses": {
"xr_standard_thumbstick_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_pressed_value",
"minNodeName": "xr_standard_thumbstick_pressed_min",
"maxNodeName": "xr_standard_thumbstick_pressed_max"
},
"xr_standard_thumbstick_xaxis_pressed": {
"componentProperty": "xAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_xaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max"
},
"xr_standard_thumbstick_yaxis_pressed": {
"componentProperty": "yAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_yaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max"
}
}
},
"x-button": {
"type": "button",
"gamepadIndices": {
"button": 4
},
"rootNodeName": "x_button",
"visualResponses": {
"x_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "x_button_pressed_value",
"minNodeName": "x_button_pressed_min",
"maxNodeName": "x_button_pressed_max"
}
}
},
"y-button": {
"type": "button",
"gamepadIndices": {
"button": 5
},
"rootNodeName": "y_button",
"visualResponses": {
"y_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "y_button_pressed_value",
"minNodeName": "y_button_pressed_min",
"maxNodeName": "y_button_pressed_max"
}
}
},
"thumbrest": {
"type": "button",
"gamepadIndices": {
"button": 6
},
"rootNodeName": "thumbrest",
"visualResponses": {
"thumbrest_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "thumbrest_pressed_value",
"minNodeName": "thumbrest_pressed_min",
"maxNodeName": "thumbrest_pressed_max"
}
}
}
},
"gamepadMapping": "xr-standard",
"rootNodeName": "meta-quest-touch-pro-left",
"assetPath": "left.glb"
},
"right": {
"selectComponentId": "xr-standard-trigger",
"components": {
"xr-standard-trigger": {
"type": "trigger",
"gamepadIndices": {
"button": 0
},
"rootNodeName": "xr_standard_trigger",
"visualResponses": {
"xr_standard_trigger_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_trigger_pressed_value",
"minNodeName": "xr_standard_trigger_pressed_min",
"maxNodeName": "xr_standard_trigger_pressed_max"
}
}
},
"xr-standard-squeeze": {
"type": "squeeze",
"gamepadIndices": {
"button": 1
},
"rootNodeName": "xr_standard_squeeze",
"visualResponses": {
"xr_standard_squeeze_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_squeeze_pressed_value",
"minNodeName": "xr_standard_squeeze_pressed_min",
"maxNodeName": "xr_standard_squeeze_pressed_max"
}
}
},
"xr-standard-thumbstick": {
"type": "thumbstick",
"gamepadIndices": {
"button": 3,
"xAxis": 2,
"yAxis": 3
},
"rootNodeName": "xr_standard_thumbstick",
"visualResponses": {
"xr_standard_thumbstick_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_pressed_value",
"minNodeName": "xr_standard_thumbstick_pressed_min",
"maxNodeName": "xr_standard_thumbstick_pressed_max"
},
"xr_standard_thumbstick_xaxis_pressed": {
"componentProperty": "xAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_xaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max"
},
"xr_standard_thumbstick_yaxis_pressed": {
"componentProperty": "yAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_yaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max"
}
}
},
"a-button": {
"type": "button",
"gamepadIndices": {
"button": 4
},
"rootNodeName": "a_button",
"visualResponses": {
"a_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "a_button_pressed_value",
"minNodeName": "a_button_pressed_min",
"maxNodeName": "a_button_pressed_max"
}
}
},
"b-button": {
"type": "button",
"gamepadIndices": {
"button": 5
},
"rootNodeName": "b_button",
"visualResponses": {
"b_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "b_button_pressed_value",
"minNodeName": "b_button_pressed_min",
"maxNodeName": "b_button_pressed_max"
}
}
},
"thumbrest": {
"type": "button",
"gamepadIndices": {
"button": 6
},
"rootNodeName": "thumbrest",
"visualResponses": {
"thumbrest_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "thumbrest_pressed_value",
"minNodeName": "thumbrest_pressed_min",
"maxNodeName": "thumbrest_pressed_max"
}
}
}
},
"gamepadMapping": "xr-standard",
"rootNodeName": "meta-quest-touch-pro-right",
"assetPath": "right.glb"
}
}
}
Binary file not shown.
@@ -1,329 +0,0 @@
{
"profileId": "oculus-touch-v2",
"fallbackProfileIds": [
"oculus-touch",
"generic-trigger-squeeze-thumbstick"
],
"layouts": {
"left": {
"selectComponentId": "xr-standard-trigger",
"components": {
"xr-standard-trigger": {
"type": "trigger",
"gamepadIndices": {
"button": 0
},
"rootNodeName": "xr_standard_trigger",
"visualResponses": {
"xr_standard_trigger_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_trigger_pressed_value",
"minNodeName": "xr_standard_trigger_pressed_min",
"maxNodeName": "xr_standard_trigger_pressed_max"
}
}
},
"xr-standard-squeeze": {
"type": "squeeze",
"gamepadIndices": {
"button": 1
},
"rootNodeName": "xr_standard_squeeze",
"visualResponses": {
"xr_standard_squeeze_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_squeeze_pressed_value",
"minNodeName": "xr_standard_squeeze_pressed_min",
"maxNodeName": "xr_standard_squeeze_pressed_max"
}
}
},
"xr-standard-thumbstick": {
"type": "thumbstick",
"gamepadIndices": {
"button": 3,
"xAxis": 2,
"yAxis": 3
},
"rootNodeName": "xr_standard_thumbstick",
"visualResponses": {
"xr_standard_thumbstick_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_pressed_value",
"minNodeName": "xr_standard_thumbstick_pressed_min",
"maxNodeName": "xr_standard_thumbstick_pressed_max"
},
"xr_standard_thumbstick_xaxis_pressed": {
"componentProperty": "xAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_xaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max"
},
"xr_standard_thumbstick_yaxis_pressed": {
"componentProperty": "yAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_yaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max"
}
}
},
"x-button": {
"type": "button",
"gamepadIndices": {
"button": 4
},
"rootNodeName": "x_button",
"visualResponses": {
"x_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "x_button_pressed_value",
"minNodeName": "x_button_pressed_min",
"maxNodeName": "x_button_pressed_max"
}
}
},
"y-button": {
"type": "button",
"gamepadIndices": {
"button": 5
},
"rootNodeName": "y_button",
"visualResponses": {
"y_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "y_button_pressed_value",
"minNodeName": "y_button_pressed_min",
"maxNodeName": "y_button_pressed_max"
}
}
},
"thumbrest": {
"type": "button",
"gamepadIndices": {
"button": 6
},
"rootNodeName": "thumbrest",
"visualResponses": {
"thumbrest_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "thumbrest_pressed_value",
"minNodeName": "thumbrest_pressed_min",
"maxNodeName": "thumbrest_pressed_max"
}
}
}
},
"gamepadMapping": "xr-standard",
"rootNodeName": "oculus-touch-v2-left",
"assetPath": "left.glb"
},
"right": {
"selectComponentId": "xr-standard-trigger",
"components": {
"xr-standard-trigger": {
"type": "trigger",
"gamepadIndices": {
"button": 0
},
"rootNodeName": "xr_standard_trigger",
"visualResponses": {
"xr_standard_trigger_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_trigger_pressed_value",
"minNodeName": "xr_standard_trigger_pressed_min",
"maxNodeName": "xr_standard_trigger_pressed_max"
}
}
},
"xr-standard-squeeze": {
"type": "squeeze",
"gamepadIndices": {
"button": 1
},
"rootNodeName": "xr_standard_squeeze",
"visualResponses": {
"xr_standard_squeeze_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_squeeze_pressed_value",
"minNodeName": "xr_standard_squeeze_pressed_min",
"maxNodeName": "xr_standard_squeeze_pressed_max"
}
}
},
"xr-standard-thumbstick": {
"type": "thumbstick",
"gamepadIndices": {
"button": 3,
"xAxis": 2,
"yAxis": 3
},
"rootNodeName": "xr_standard_thumbstick",
"visualResponses": {
"xr_standard_thumbstick_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_pressed_value",
"minNodeName": "xr_standard_thumbstick_pressed_min",
"maxNodeName": "xr_standard_thumbstick_pressed_max"
},
"xr_standard_thumbstick_xaxis_pressed": {
"componentProperty": "xAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_xaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max"
},
"xr_standard_thumbstick_yaxis_pressed": {
"componentProperty": "yAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_yaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max"
}
}
},
"a-button": {
"type": "button",
"gamepadIndices": {
"button": 4
},
"rootNodeName": "a_button",
"visualResponses": {
"a_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "a_button_pressed_value",
"minNodeName": "a_button_pressed_min",
"maxNodeName": "a_button_pressed_max"
}
}
},
"b-button": {
"type": "button",
"gamepadIndices": {
"button": 5
},
"rootNodeName": "b_button",
"visualResponses": {
"b_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "b_button_pressed_value",
"minNodeName": "b_button_pressed_min",
"maxNodeName": "b_button_pressed_max"
}
}
},
"thumbrest": {
"type": "button",
"gamepadIndices": {
"button": 6
},
"rootNodeName": "thumbrest",
"visualResponses": {
"thumbrest_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "thumbrest_pressed_value",
"minNodeName": "thumbrest_pressed_min",
"maxNodeName": "thumbrest_pressed_max"
}
}
}
},
"gamepadMapping": "xr-standard",
"rootNodeName": "oculus-touch-v2-right",
"assetPath": "right.glb"
}
}
}
Binary file not shown.
Binary file not shown.
@@ -1,330 +0,0 @@
{
"profileId": "oculus-touch-v3",
"fallbackProfileIds": [
"oculus-touch-v2",
"oculus-touch",
"generic-trigger-squeeze-thumbstick"
],
"layouts": {
"left": {
"selectComponentId": "xr-standard-trigger",
"components": {
"xr-standard-trigger": {
"type": "trigger",
"gamepadIndices": {
"button": 0
},
"rootNodeName": "xr_standard_trigger",
"visualResponses": {
"xr_standard_trigger_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_trigger_pressed_value",
"minNodeName": "xr_standard_trigger_pressed_min",
"maxNodeName": "xr_standard_trigger_pressed_max"
}
}
},
"xr-standard-squeeze": {
"type": "squeeze",
"gamepadIndices": {
"button": 1
},
"rootNodeName": "xr_standard_squeeze",
"visualResponses": {
"xr_standard_squeeze_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_squeeze_pressed_value",
"minNodeName": "xr_standard_squeeze_pressed_min",
"maxNodeName": "xr_standard_squeeze_pressed_max"
}
}
},
"xr-standard-thumbstick": {
"type": "thumbstick",
"gamepadIndices": {
"button": 3,
"xAxis": 2,
"yAxis": 3
},
"rootNodeName": "xr_standard_thumbstick",
"visualResponses": {
"xr_standard_thumbstick_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_pressed_value",
"minNodeName": "xr_standard_thumbstick_pressed_min",
"maxNodeName": "xr_standard_thumbstick_pressed_max"
},
"xr_standard_thumbstick_xaxis_pressed": {
"componentProperty": "xAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_xaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max"
},
"xr_standard_thumbstick_yaxis_pressed": {
"componentProperty": "yAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_yaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max"
}
}
},
"x-button": {
"type": "button",
"gamepadIndices": {
"button": 4
},
"rootNodeName": "x_button",
"visualResponses": {
"x_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "x_button_pressed_value",
"minNodeName": "x_button_pressed_min",
"maxNodeName": "x_button_pressed_max"
}
}
},
"y-button": {
"type": "button",
"gamepadIndices": {
"button": 5
},
"rootNodeName": "y_button",
"visualResponses": {
"y_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "y_button_pressed_value",
"minNodeName": "y_button_pressed_min",
"maxNodeName": "y_button_pressed_max"
}
}
},
"thumbrest": {
"type": "button",
"gamepadIndices": {
"button": 6
},
"rootNodeName": "thumbrest",
"visualResponses": {
"thumbrest_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "thumbrest_pressed_value",
"minNodeName": "thumbrest_pressed_min",
"maxNodeName": "thumbrest_pressed_max"
}
}
}
},
"gamepadMapping": "xr-standard",
"rootNodeName": "oculus-touch-v3-left",
"assetPath": "left.glb"
},
"right": {
"selectComponentId": "xr-standard-trigger",
"components": {
"xr-standard-trigger": {
"type": "trigger",
"gamepadIndices": {
"button": 0
},
"rootNodeName": "xr_standard_trigger",
"visualResponses": {
"xr_standard_trigger_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_trigger_pressed_value",
"minNodeName": "xr_standard_trigger_pressed_min",
"maxNodeName": "xr_standard_trigger_pressed_max"
}
}
},
"xr-standard-squeeze": {
"type": "squeeze",
"gamepadIndices": {
"button": 1
},
"rootNodeName": "xr_standard_squeeze",
"visualResponses": {
"xr_standard_squeeze_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_squeeze_pressed_value",
"minNodeName": "xr_standard_squeeze_pressed_min",
"maxNodeName": "xr_standard_squeeze_pressed_max"
}
}
},
"xr-standard-thumbstick": {
"type": "thumbstick",
"gamepadIndices": {
"button": 3,
"xAxis": 2,
"yAxis": 3
},
"rootNodeName": "xr_standard_thumbstick",
"visualResponses": {
"xr_standard_thumbstick_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_pressed_value",
"minNodeName": "xr_standard_thumbstick_pressed_min",
"maxNodeName": "xr_standard_thumbstick_pressed_max"
},
"xr_standard_thumbstick_xaxis_pressed": {
"componentProperty": "xAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_xaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max"
},
"xr_standard_thumbstick_yaxis_pressed": {
"componentProperty": "yAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_yaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max"
}
}
},
"a-button": {
"type": "button",
"gamepadIndices": {
"button": 4
},
"rootNodeName": "a_button",
"visualResponses": {
"a_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "a_button_pressed_value",
"minNodeName": "a_button_pressed_min",
"maxNodeName": "a_button_pressed_max"
}
}
},
"b-button": {
"type": "button",
"gamepadIndices": {
"button": 5
},
"rootNodeName": "b_button",
"visualResponses": {
"b_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "b_button_pressed_value",
"minNodeName": "b_button_pressed_min",
"maxNodeName": "b_button_pressed_max"
}
}
},
"thumbrest": {
"type": "button",
"gamepadIndices": {
"button": 6
},
"rootNodeName": "thumbrest",
"visualResponses": {
"thumbrest_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "thumbrest_pressed_value",
"minNodeName": "thumbrest_pressed_min",
"maxNodeName": "thumbrest_pressed_max"
}
}
}
},
"gamepadMapping": "xr-standard",
"rootNodeName": "oculus-touch-v3-right",
"assetPath": "right.glb"
}
}
}
Binary file not shown.
Binary file not shown.
@@ -1,286 +0,0 @@
{
"profileId": "pico-4",
"fallbackProfileIds": [
"generic-trigger-squeeze-thumbstick"
],
"layouts": {
"left": {
"selectComponentId": "xr-standard-trigger",
"components": {
"xr-standard-trigger": {
"type": "trigger",
"gamepadIndices": {
"button": 0
},
"rootNodeName": "xr_standard_trigger",
"visualResponses": {
"xr_standard_trigger_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_trigger_pressed_value",
"minNodeName": "xr_standard_trigger_pressed_min",
"maxNodeName": "xr_standard_trigger_pressed_max"
}
}
},
"xr-standard-squeeze": {
"type": "squeeze",
"gamepadIndices": {
"button": 1
},
"rootNodeName": "xr_standard_squeeze",
"visualResponses": {
"xr_standard_squeeze_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_squeeze_pressed_value",
"minNodeName": "xr_standard_squeeze_pressed_min",
"maxNodeName": "xr_standard_squeeze_pressed_max"
}
}
},
"xr-standard-thumbstick": {
"type": "thumbstick",
"gamepadIndices": {
"button": 3,
"xAxis": 2,
"yAxis": 3
},
"rootNodeName": "xr_standard_thumbstick",
"visualResponses": {
"xr_standard_thumbstick_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_pressed_value",
"minNodeName": "xr_standard_thumbstick_pressed_min",
"maxNodeName": "xr_standard_thumbstick_pressed_max"
},
"xr_standard_thumbstick_xaxis_pressed": {
"componentProperty": "xAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_xaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max"
},
"xr_standard_thumbstick_yaxis_pressed": {
"componentProperty": "yAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_yaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max"
}
}
},
"x-button": {
"type": "button",
"gamepadIndices": {
"button": 4
},
"rootNodeName": "x_button",
"visualResponses": {
"x_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "x_button_pressed_value",
"minNodeName": "x_button_pressed_min",
"maxNodeName": "x_button_pressed_max"
}
}
},
"y-button": {
"type": "button",
"gamepadIndices": {
"button": 5
},
"rootNodeName": "y_button",
"visualResponses": {
"y_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "y_button_pressed_value",
"minNodeName": "y_button_pressed_min",
"maxNodeName": "y_button_pressed_max"
}
}
}
},
"gamepadMapping": "xr-standard",
"rootNodeName": "pico-4-left",
"assetPath": "left.glb"
},
"right": {
"selectComponentId": "xr-standard-trigger",
"components": {
"xr-standard-trigger": {
"type": "trigger",
"gamepadIndices": {
"button": 0
},
"rootNodeName": "xr_standard_trigger",
"visualResponses": {
"xr_standard_trigger_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_trigger_pressed_value",
"minNodeName": "xr_standard_trigger_pressed_min",
"maxNodeName": "xr_standard_trigger_pressed_max"
}
}
},
"xr-standard-squeeze": {
"type": "squeeze",
"gamepadIndices": {
"button": 1
},
"rootNodeName": "xr_standard_squeeze",
"visualResponses": {
"xr_standard_squeeze_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_squeeze_pressed_value",
"minNodeName": "xr_standard_squeeze_pressed_min",
"maxNodeName": "xr_standard_squeeze_pressed_max"
}
}
},
"xr-standard-thumbstick": {
"type": "thumbstick",
"gamepadIndices": {
"button": 3,
"xAxis": 2,
"yAxis": 3
},
"rootNodeName": "xr_standard_thumbstick",
"visualResponses": {
"xr_standard_thumbstick_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_pressed_value",
"minNodeName": "xr_standard_thumbstick_pressed_min",
"maxNodeName": "xr_standard_thumbstick_pressed_max"
},
"xr_standard_thumbstick_xaxis_pressed": {
"componentProperty": "xAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_xaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max"
},
"xr_standard_thumbstick_yaxis_pressed": {
"componentProperty": "yAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_yaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max"
}
}
},
"a-button": {
"type": "button",
"gamepadIndices": {
"button": 4
},
"rootNodeName": "a_button",
"visualResponses": {
"a_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "a_button_pressed_value",
"minNodeName": "a_button_pressed_min",
"maxNodeName": "a_button_pressed_max"
}
}
},
"b-button": {
"type": "button",
"gamepadIndices": {
"button": 5
},
"rootNodeName": "b_button",
"visualResponses": {
"b_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "b_button_pressed_value",
"minNodeName": "b_button_pressed_min",
"maxNodeName": "b_button_pressed_max"
}
}
}
},
"gamepadMapping": "xr-standard",
"rootNodeName": "pico-4-right",
"assetPath": "right.glb"
}
}
}
Binary file not shown.
Binary file not shown.
@@ -1,286 +0,0 @@
{
"profileId": "pico-neo3",
"fallbackProfileIds": [
"generic-trigger-squeeze-thumbstick"
],
"layouts": {
"left": {
"selectComponentId": "xr-standard-trigger",
"components": {
"xr-standard-trigger": {
"type": "trigger",
"gamepadIndices": {
"button": 0
},
"rootNodeName": "xr_standard_trigger",
"visualResponses": {
"xr_standard_trigger_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_trigger_pressed_value",
"minNodeName": "xr_standard_trigger_pressed_min",
"maxNodeName": "xr_standard_trigger_pressed_max"
}
}
},
"xr-standard-squeeze": {
"type": "squeeze",
"gamepadIndices": {
"button": 1
},
"rootNodeName": "xr_standard_squeeze",
"visualResponses": {
"xr_standard_squeeze_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_squeeze_pressed_value",
"minNodeName": "xr_standard_squeeze_pressed_min",
"maxNodeName": "xr_standard_squeeze_pressed_max"
}
}
},
"xr-standard-thumbstick": {
"type": "thumbstick",
"gamepadIndices": {
"button": 3,
"xAxis": 2,
"yAxis": 3
},
"rootNodeName": "xr_standard_thumbstick",
"visualResponses": {
"xr_standard_thumbstick_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_pressed_value",
"minNodeName": "xr_standard_thumbstick_pressed_min",
"maxNodeName": "xr_standard_thumbstick_pressed_max"
},
"xr_standard_thumbstick_xaxis_pressed": {
"componentProperty": "xAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_xaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max"
},
"xr_standard_thumbstick_yaxis_pressed": {
"componentProperty": "yAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_yaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max"
}
}
},
"x-button": {
"type": "button",
"gamepadIndices": {
"button": 4
},
"rootNodeName": "x_button",
"visualResponses": {
"x_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "x_button_pressed_value",
"minNodeName": "x_button_pressed_min",
"maxNodeName": "x_button_pressed_max"
}
}
},
"y-button": {
"type": "button",
"gamepadIndices": {
"button": 5
},
"rootNodeName": "y_button",
"visualResponses": {
"y_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "y_button_pressed_value",
"minNodeName": "y_button_pressed_min",
"maxNodeName": "y_button_pressed_max"
}
}
}
},
"gamepadMapping": "xr-standard",
"rootNodeName": "pico-neo3-left",
"assetPath": "left.glb"
},
"right": {
"selectComponentId": "xr-standard-trigger",
"components": {
"xr-standard-trigger": {
"type": "trigger",
"gamepadIndices": {
"button": 0
},
"rootNodeName": "xr_standard_trigger",
"visualResponses": {
"xr_standard_trigger_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_trigger_pressed_value",
"minNodeName": "xr_standard_trigger_pressed_min",
"maxNodeName": "xr_standard_trigger_pressed_max"
}
}
},
"xr-standard-squeeze": {
"type": "squeeze",
"gamepadIndices": {
"button": 1
},
"rootNodeName": "xr_standard_squeeze",
"visualResponses": {
"xr_standard_squeeze_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_squeeze_pressed_value",
"minNodeName": "xr_standard_squeeze_pressed_min",
"maxNodeName": "xr_standard_squeeze_pressed_max"
}
}
},
"xr-standard-thumbstick": {
"type": "thumbstick",
"gamepadIndices": {
"button": 3,
"xAxis": 2,
"yAxis": 3
},
"rootNodeName": "xr_standard_thumbstick",
"visualResponses": {
"xr_standard_thumbstick_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_pressed_value",
"minNodeName": "xr_standard_thumbstick_pressed_min",
"maxNodeName": "xr_standard_thumbstick_pressed_max"
},
"xr_standard_thumbstick_xaxis_pressed": {
"componentProperty": "xAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_xaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_xaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_xaxis_pressed_max"
},
"xr_standard_thumbstick_yaxis_pressed": {
"componentProperty": "yAxis",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "xr_standard_thumbstick_yaxis_pressed_value",
"minNodeName": "xr_standard_thumbstick_yaxis_pressed_min",
"maxNodeName": "xr_standard_thumbstick_yaxis_pressed_max"
}
}
},
"a-button": {
"type": "button",
"gamepadIndices": {
"button": 4
},
"rootNodeName": "a_button",
"visualResponses": {
"a_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "a_button_pressed_value",
"minNodeName": "a_button_pressed_min",
"maxNodeName": "a_button_pressed_max"
}
}
},
"b-button": {
"type": "button",
"gamepadIndices": {
"button": 5
},
"rootNodeName": "b_button",
"visualResponses": {
"b_button_pressed": {
"componentProperty": "button",
"states": [
"default",
"touched",
"pressed"
],
"valueNodeProperty": "transform",
"valueNodeName": "b_button_pressed_value",
"minNodeName": "b_button_pressed_min",
"maxNodeName": "b_button_pressed_max"
}
}
}
},
"gamepadMapping": "xr-standard",
"rootNodeName": "pico-neo3-right",
"assetPath": "right.glb"
}
}
}
Binary file not shown.
+23 -8
View File
@@ -65,6 +65,15 @@ if(ANDROID)
target_compile_definitions(wivrn PRIVATE -DXR_USE_PLATFORM_ANDROID -DVK_USE_PLATFORM_ANDROID_KHR)
target_link_options(wivrn PRIVATE -Wl,--undefined=ANativeActivity_onCreate)
target_link_options(wivrn
PRIVATE
-Wl,--version-script,${CMAKE_CURRENT_SOURCE_DIR}/android/exported_symbols.txt
# This causes the linker to emit an error when a version script names a
# symbol that is not found, rather than silently ignoring that line.
-Wl,--no-undefined-version
)
set_target_properties(wivrn PROPERTIES LINK_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/android/exported_symbols.txt)
file(GLOB PLATFORM_SOURCE CONFIGURE_DEPENDS
"android/*.cpp"
"audio/android/*.cpp"
@@ -254,11 +263,13 @@ set(ASSETS_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../assets-source)
wivrn_rasterize_svg(SOURCE ${IMAGES_SRC_DIR}/wivrn.svg DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/wivrn.png WIDTH 540 HEIGHT 540 CSS ${WIVRN_CSS_ABS})
wivrn_rasterize_svg(SOURCE ${IMAGES_SRC_DIR}/wivrn-pride.svg DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/wivrn-pride.png WIDTH 540 HEIGHT 540 CSS ${WIVRN_CSS_ABS})
wivrn_rasterize_svg(SOURCE ${IMAGES_SRC_DIR}/wivrn-christmas.svg DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/wivrn-christmas.png WIDTH 540 HEIGHT 540 CSS ${WIVRN_CSS_ABS})
wivrn_rasterize_svg(SOURCE ${ASSETS_SRC_DIR}/passthrough.svg DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/passthrough.png WIDTH 256 HEIGHT 256)
wivrn_rasterize_svg(SOURCE ${ASSETS_SRC_DIR}/default-environment.svg DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/default-environment.png WIDTH 256 HEIGHT 256)
wivrn_generate_ktx( SOURCE ${CMAKE_CURRENT_BINARY_DIR}/wivrn.png DESTINATION ${ASSETS_DIR}/wivrn.ktx2 TARGET wivrn)
wivrn_generate_ktx( SOURCE ${CMAKE_CURRENT_BINARY_DIR}/wivrn-pride.png DESTINATION ${ASSETS_DIR}/wivrn-pride.ktx2 TARGET wivrn)
wivrn_generate_ktx( SOURCE ${CMAKE_CURRENT_BINARY_DIR}/wivrn-christmas.png DESTINATION ${ASSETS_DIR}/wivrn-christmas.ktx2 TARGET wivrn)
wivrn_generate_ktx( SOURCE ${ASSETS_SRC_DIR}/default_icon.png DESTINATION ${ASSETS_DIR}/default_icon.ktx2 TARGET wivrn)
wivrn_generate_ktx( SOURCE ${CMAKE_CURRENT_BINARY_DIR}/passthrough.png DESTINATION ${ASSETS_DIR}/passthrough.ktx2 TARGET wivrn)
wivrn_generate_ktx( SOURCE ${CMAKE_CURRENT_BINARY_DIR}/default-environment.png DESTINATION ${ASSETS_DIR}/default-environment.ktx2 TARGET wivrn)
@@ -267,14 +278,18 @@ if(WIVRN_COMPRESS_GLB)
else()
wivrn_copy_file( SOURCE ${ASSETS_SRC_DIR}/ground.glb DESTINATION ${ASSETS_DIR}/ground.glb TARGET wivrn)
endif()
wivrn_webxr_controller( SOURCE ${ASSETS_SRC_DIR}/controllers/generic-trigger-squeeze DESTINATION ${ASSETS_DIR}/controllers/generic-trigger-squeeze TARGET wivrn)
wivrn_webxr_controller( SOURCE ${ASSETS_SRC_DIR}/controllers/htc-vive-focus-3 DESTINATION ${ASSETS_DIR}/controllers/htc-vive-focus-3 TARGET wivrn)
wivrn_webxr_controller( SOURCE ${ASSETS_SRC_DIR}/controllers/meta-quest-touch-plus DESTINATION ${ASSETS_DIR}/controllers/meta-quest-touch-plus TARGET wivrn)
wivrn_webxr_controller( SOURCE ${ASSETS_SRC_DIR}/controllers/meta-quest-touch-pro DESTINATION ${ASSETS_DIR}/controllers/meta-quest-touch-pro TARGET wivrn)
wivrn_webxr_controller( SOURCE ${ASSETS_SRC_DIR}/controllers/oculus-touch-v2 DESTINATION ${ASSETS_DIR}/controllers/oculus-touch-v2 TARGET wivrn)
wivrn_webxr_controller( SOURCE ${ASSETS_SRC_DIR}/controllers/oculus-touch-v3 DESTINATION ${ASSETS_DIR}/controllers/oculus-touch-v3 TARGET wivrn)
wivrn_webxr_controller( SOURCE ${ASSETS_SRC_DIR}/controllers/pico-4 DESTINATION ${ASSETS_DIR}/controllers/pico-4 TARGET wivrn)
wivrn_webxr_controller( SOURCE ${ASSETS_SRC_DIR}/controllers/pico-neo3 DESTINATION ${ASSETS_DIR}/controllers/pico-neo3 TARGET wivrn)
wivrn_webxr_download()
wivrn_webxr_controller(PROFILE generic-trigger-squeeze DESTINATION ${ASSETS_DIR}/controllers TARGET wivrn)
wivrn_webxr_controller(PROFILE htc-vive-focus-3 DESTINATION ${ASSETS_DIR}/controllers TARGET wivrn)
wivrn_webxr_controller(PROFILE meta-quest-touch-plus DESTINATION ${ASSETS_DIR}/controllers TARGET wivrn)
wivrn_webxr_controller(PROFILE meta-quest-touch-pro DESTINATION ${ASSETS_DIR}/controllers TARGET wivrn)
wivrn_webxr_controller(PROFILE oculus-touch-v2 DESTINATION ${ASSETS_DIR}/controllers TARGET wivrn)
wivrn_webxr_controller(PROFILE oculus-touch-v3 DESTINATION ${ASSETS_DIR}/controllers TARGET wivrn)
wivrn_webxr_controller(PROFILE pico-4 DESTINATION ${ASSETS_DIR}/controllers TARGET wivrn)
wivrn_webxr_controller(PROFILE pico-4u DESTINATION ${ASSETS_DIR}/controllers TARGET wivrn)
wivrn_webxr_controller(PROFILE pico-neo3 DESTINATION ${ASSETS_DIR}/controllers TARGET wivrn)
wivrn_webxr_controller(PROFILE samsung-galaxyxr DESTINATION ${ASSETS_DIR}/controllers TARGET wivrn)
# Add the VR splash screen (only used on Quest)
+11
View File
@@ -0,0 +1,11 @@
LIBAPP {
global:
ANativeActivity_onCreate;
android_main;
Java_org_meumeu_wivrn_BroadcastReceiver_onReceive;
Java_org_meumeu_wivrn_MainActivity_onRequestPermissionsResult;
Java_org_meumeu_wivrn_MainActivity_onActivityResult;
Java_org_meumeu_wivrn_MainActivity_onNewIntent;
local:
*;
};
+16
View File
@@ -1061,6 +1061,19 @@ void application::initialize_actions()
}
}
// Patch profile to add pinch_ext/pose and poke_ext/pose
if (xr_instance.has_extension(XR_EXT_HAND_INTERACTION_EXTENSION_NAME) //
and utils::contains(profile.input_sources, "/user/hand/left/input/grip/pose") //
and not utils::contains(profile.input_sources, "/user/hand/left/input/pinch_ext/pose"))
{
spdlog::info("Adding pinch_ext/pose for interaction profile {}", profile.profile_name);
profile.input_sources.push_back("/user/hand/left/input/pinch_ext/pose");
profile.input_sources.push_back("/user/hand/right/input/pinch_ext/pose");
spdlog::info("Adding poke_ext/pose for interaction profile {}", profile.profile_name);
profile.input_sources.push_back("/user/hand/left/input/poke_ext/pose");
profile.input_sources.push_back("/user/hand/right/input/poke_ext/pose");
}
// Dynamically add VIVE XR Trackers to the profile if available
if (utils::contains(profile.required_extensions, XR_HTC_VIVE_XR_TRACKER_INTERACTION_EXTENSION_NAME) and
xr_instance.has_extension(XR_HTC_PATH_ENUMERATION_EXTENSION_NAME))
@@ -1219,6 +1232,8 @@ void application::initialize()
XR_EXT_PERFORMANCE_SETTINGS_EXTENSION_NAME,
XR_EXT_USER_PRESENCE_EXTENSION_NAME,
XR_ANDROID_FACE_TRACKING_EXTENSION_NAME,
XR_BD_BODY_TRACKING_EXTENSION_NAME,
XR_FB_BODY_TRACKING_EXTENSION_NAME,
@@ -1240,6 +1255,7 @@ void application::initialize()
XR_META_BODY_TRACKING_FIDELITY_EXTENSION_NAME,
XR_META_BODY_TRACKING_FULL_BODY_EXTENSION_NAME,
XR_META_LOCAL_DIMMING_EXTENSION_NAME,
};
for (const auto & i: interaction_profiles)
+69 -8
View File
@@ -20,6 +20,7 @@
#include "configuration.h"
#include "application.h"
#include "utils/json_string.h"
#include "wivrn_packets.h"
#include <fstream>
#include <magic_enum.hpp>
@@ -98,6 +99,29 @@ configuration::configuration(xr::system & system)
{
passthrough_enabled = system.passthrough_supported() == xr::passthrough_type::color;
features[feature::hand_tracking] = system.hand_tracking_supported();
switch (guess_model())
{
case model::oculus_quest:
case model::oculus_quest_2:
case model::meta_quest_pro:
case model::meta_quest_3:
case model::meta_quest_3s:
high_power_mode = false;
break;
case model::pico_neo_3:
case model::pico_4:
case model::pico_4s:
case model::pico_4_pro:
case model::pico_4_enterprise:
case model::htc_vive_focus_3:
case model::htc_vive_xr_elite:
case model::htc_vive_focus_vision:
case model::lynx_r1:
case model::samsung_galaxy_xr:
case model::unknown:
high_power_mode = true;
break;
}
try
{
simdjson::dom::parser parser;
@@ -129,6 +153,27 @@ configuration::configuration(xr::system & system)
if (auto val = root["resolution_scale"]; val.is_double())
resolution_scale = val.get_double();
if (auto val = root["stream_scale"]; val.is_double())
stream_scale = val.get_double();
if (auto val = root["codec"]; val.is_string())
{
const auto codec_str = val.get_string().value();
for (const auto & [c, name]: magic_enum::enum_entries<wivrn::video_codec>())
{
if (codec_str == name)
{
codec = c;
}
}
}
if (auto val = root["bit_depth"]; val.is_uint64())
bit_depth = val.get_uint64();
if (auto val = root["bitrate_bps"]; val.is_number())
bitrate_bps = val.get_uint64();
if (auto val = root["enable_stream_gui"]; val.is_bool())
enable_stream_gui = val.get_bool();
@@ -178,18 +223,13 @@ configuration::configuration(xr::system & system)
if (auto val = root["high_power_mode"]; val.is_bool())
high_power_mode = val.get_bool();
if (auto val = root["extended_config"]; val.is_bool())
extended_config = val.get_bool();
}
catch (std::exception & e)
{
spdlog::warn("Cannot read configuration: {}", e.what());
// Restore default configuration
servers.clear();
preferred_refresh_rate.reset();
minimum_refresh_rate.reset();
resolution_scale = 1.0;
openxr_post_processing = {};
passthrough_enabled = system.passthrough_supported() == xr::passthrough_type::color;
}
}
@@ -250,6 +290,12 @@ void configuration::save()
if (minimum_refresh_rate)
json << ",\"minimum_refresh_rate\":" << *minimum_refresh_rate;
json << ",\"resolution_scale\":" << resolution_scale;
if (stream_scale)
json << ",\"stream_scale\":" << *stream_scale;
if (codec)
json << ",\"codec\":" << json_string(magic_enum::enum_name(*codec));
json << ",\"bit_depth\":" << (uint64_t)bit_depth;
json << ",\"bitrate_bps\":" << bitrate_bps;
json << ",\"openxr_post_processing\":";
write_openxr_post_processing(json, openxr_post_processing);
json << ",\"passthrough_enabled\":" << std::boolalpha << passthrough_enabled;
@@ -267,5 +313,20 @@ void configuration::save()
json << ",\"locale\":" << json_string(locale);
json << ",\"environment_model\":" << json_string(environment_model);
json << ",\"high_power_mode\":" << std::boolalpha << high_power_mode;
json << ",\"extended_config\":" << std::boolalpha << extended_config;
json << "}";
}
void configuration::set_stream_scale(float val)
{
stream_scale = val;
}
float configuration::get_stream_scale() const
{
if (stream_scale)
return *stream_scale;
if (check_feature(feature::eye_gaze))
return 0.3;
return 0.5;
}
+18 -1
View File
@@ -21,6 +21,7 @@
#include "hardware.h"
#include "wivrn_discover.h"
#include "wivrn_packets.h"
#include <map>
#include <mutex>
@@ -50,6 +51,10 @@ public:
std::optional<float> preferred_refresh_rate;
std::optional<float> minimum_refresh_rate;
float resolution_scale = 1.0;
std::optional<wivrn::video_codec> codec;
uint32_t bitrate_bps = 50'000'000;
uint8_t bit_depth = 10;
bool passthrough_enabled = false;
bool mic_unprocessed_audio = false;
@@ -74,7 +79,10 @@ public:
float override_foveation_pitch = 10 * M_PI / 180;
float override_foveation_distance = 3;
bool high_power_mode = false;
bool high_power_mode;
// Allow unsafe config values
bool extended_config = false;
bool first_run = true;
@@ -86,6 +94,7 @@ public:
private:
mutable std::mutex mutex;
std::map<feature, bool> features;
std::optional<float> stream_scale;
void parse_openxr_post_processing_options(simdjson::simdjson_result<simdjson::dom::object> root);
@@ -94,4 +103,12 @@ public:
configuration() = default;
void save();
void set_stream_scale(float);
float get_stream_scale() const;
uint32_t max_bitrate() const
{
return extended_config ? 800'000'000u : 200'000'000u;
}
};
+24 -19
View File
@@ -42,6 +42,7 @@ struct wivrn::android::decoder::mapped_hardware_buffer
{
vk::raii::DeviceMemory memory = nullptr;
vk::raii::Image vimage = nullptr;
vk::Extent2D extent{};
vk::raii::ImageView image_view = nullptr;
vk::ImageLayout layout = vk::ImageLayout::eUndefined;
};
@@ -85,11 +86,12 @@ struct android_blit_handle : public decoder::blit_handle
const wivrn::to_headset::video_stream_data_shard::view_info_t & view_info,
vk::ImageView image_view,
vk::Image image,
vk::Extent2D extent,
vk::ImageLayout & current_layout,
decltype(vk_data) vk_data,
decltype(image_reader) image_reader,
decltype(aimage) aimage) :
decoder::blit_handle(feedback, view_info, image_view, image, current_layout),
decoder::blit_handle(feedback, view_info, image_view, image, extent, current_layout),
vk_data(vk_data),
image_reader(image_reader),
aimage(std::move(aimage)) {}
@@ -103,19 +105,21 @@ namespace wivrn::android
decoder::decoder(
vk::raii::Device & device,
vk::raii::PhysicalDevice & physical_device,
const wivrn::to_headset::video_stream_description::item & description,
float fps,
const wivrn::to_headset::video_stream_description & description,
uint8_t stream_index,
std::weak_ptr<scenes::stream> weak_scene,
shard_accumulator * accumulator) :
wivrn::decoder(description), stream_index(stream_index), fps(fps), device(device), weak_scene(weak_scene), accumulator(accumulator)
stream_index(stream_index), device(device), weak_scene(weak_scene), accumulator(accumulator)
{
spdlog::info("hbm_mutex.native_handle() = {}", (void *)hbm_mutex.native_handle());
auto width = description.width;
auto height = description.height / (stream_index == 2 ? 2 : 1);
AImageReader * ir;
check(AImageReader_newWithUsage(
description.video_width,
description.video_height,
width,
height,
AIMAGE_FORMAT_PRIVATE,
AHARDWAREBUFFER_USAGE_CPU_READ_NEVER | AHARDWAREBUFFER_USAGE_CPU_WRITE_NEVER | AHARDWAREBUFFER_USAGE_GPU_SAMPLED_IMAGE,
scenes::stream::image_buffer_size + 4 /* maxImages */,
@@ -131,18 +135,18 @@ decoder::decoder(
"vkGetAndroidHardwareBufferPropertiesANDROID");
{
AMediaFormat_ptr format(AMediaFormat_new());
AMediaFormat_setString(format.get(), AMEDIAFORMAT_KEY_MIME, mime(description.codec));
AMediaFormat_setString(format.get(), AMEDIAFORMAT_KEY_MIME, mime(description.codec[stream_index]));
// AMediaFormat_setInt32(format.get(), "vendor.qti-ext-dec-low-latency.enable", 1); // Qualcomm low
// latency mode
AMediaFormat_setInt32(format.get(), AMEDIAFORMAT_KEY_WIDTH, description.video_width);
AMediaFormat_setInt32(format.get(), AMEDIAFORMAT_KEY_HEIGHT, description.video_height);
AMediaFormat_setInt32(format.get(), AMEDIAFORMAT_KEY_OPERATING_RATE, std::ceil(fps));
AMediaFormat_setInt32(format.get(), AMEDIAFORMAT_KEY_WIDTH, width);
AMediaFormat_setInt32(format.get(), AMEDIAFORMAT_KEY_HEIGHT, height);
AMediaFormat_setInt32(format.get(), AMEDIAFORMAT_KEY_OPERATING_RATE, std::ceil(description.fps));
AMediaFormat_setInt32(format.get(), AMEDIAFORMAT_KEY_PRIORITY, 0);
media_codec.reset(AMediaCodec_createDecoderByType(mime(description.codec)));
media_codec.reset(AMediaCodec_createDecoderByType(mime(description.codec[stream_index])));
if (not media_codec)
throw std::runtime_error(std::string("Cannot create decoder for MIME type ") + mime(description.codec));
throw std::runtime_error(std::string("Cannot create decoder for MIME type ") + mime(description.codec[stream_index]));
char * codec_name;
check(AMediaCodec_getName(media_codec.get(), &codec_name), "AMediaCodec_getName");
@@ -308,6 +312,7 @@ void decoder::on_image_available(AImageReader * reader)
info->view_info,
*vk_data->image_view,
*vk_data->vimage,
vk_data->extent,
vk_data->layout,
std::move(vk_data),
image_reader,
@@ -361,11 +366,8 @@ void decoder::create_sampler(const AHardwareBuffer_Desc & buffer_desc, vk::Andro
};
// suggested values from decoder don't actually read the metadata, so it's garbage
if (description.range)
ycbcr_create_info.get<vk::SamplerYcbcrConversionCreateInfo>().ycbcrRange = vk::SamplerYcbcrRange(*description.range);
if (description.color_model)
ycbcr_create_info.get<vk::SamplerYcbcrConversionCreateInfo>().ycbcrModel = vk::SamplerYcbcrModelConversion(*description.color_model);
ycbcr_create_info.get<vk::SamplerYcbcrConversionCreateInfo>().ycbcrRange = vk::SamplerYcbcrRange::eItuFull;
ycbcr_create_info.get<vk::SamplerYcbcrConversionCreateInfo>().ycbcrModel = vk::SamplerYcbcrModelConversion::eYcbcr709;
ycbcr_conversion = vk::raii::SamplerYcbcrConversion(device, ycbcr_create_info.get<vk::SamplerYcbcrConversionCreateInfo>());
@@ -411,7 +413,6 @@ std::shared_ptr<decoder::mapped_hardware_buffer> decoder::map_hardware_buffer(AI
if (!*ycbcr_sampler || memcmp(&ahb_format, &format_properties, sizeof(format_properties)))
{
memcpy(&ahb_format, &format_properties, sizeof(format_properties));
extent_ = {buffer_desc.width, buffer_desc.height};
spdlog::info("decoded image size: {}x{}", buffer_desc.width, buffer_desc.height);
create_sampler(buffer_desc, ahb_format);
hardware_buffer_map.clear();
@@ -490,6 +491,10 @@ std::shared_ptr<decoder::mapped_hardware_buffer> decoder::map_hardware_buffer(AI
handle->vimage = std::move(vimage);
handle->image_view = std::move(image_view);
handle->memory = std::move(memory);
handle->extent = vk::Extent2D{
.width = buffer_desc.width,
.height = buffer_desc.height,
};
hardware_buffer_map[hardware_buffer] = handle;
return handle;
@@ -569,8 +574,8 @@ void decoder::supported_codecs(std::vector<wivrn::video_codec> & result)
// In order or preference, from preferred to least preferred
for (auto codec: {
wivrn::video_codec::av1,
wivrn::video_codec::h264,
wivrn::video_codec::h265,
wivrn::video_codec::h264,
})
{
AMediaCodec_ptr media_codec(AMediaCodec_createDecoderByType(mime(codec)));
+1 -3
View File
@@ -67,7 +67,6 @@ public:
private:
uint8_t stream_index;
float fps;
vk::raii::Device & device;
@@ -122,8 +121,7 @@ private:
public:
decoder(vk::raii::Device & device,
vk::raii::PhysicalDevice & physical_device,
const wivrn::to_headset::video_stream_description::item & description,
float fps,
const wivrn::to_headset::video_stream_description & description,
uint8_t stream_index,
std::weak_ptr<scenes::stream> scene,
shard_accumulator * accumulator);
+2 -4
View File
@@ -31,13 +31,12 @@ std::shared_ptr<wivrn::decoder> wivrn::decoder::make(
vk::raii::Device & device,
vk::raii::PhysicalDevice & phys_dev,
uint32_t vk_queue_family_index,
const wivrn::to_headset::video_stream_description::item & description,
float fps,
const wivrn::to_headset::video_stream_description & description,
uint8_t stream_index,
std::weak_ptr<scenes::stream> scene,
shard_accumulator * acc)
{
switch (description.codec)
switch (description.codec[stream_index])
{
case h264:
case h265:
@@ -47,7 +46,6 @@ std::shared_ptr<wivrn::decoder> wivrn::decoder::make(
device,
phys_dev,
description,
fps,
stream_index,
scene,
acc);
+2 -13
View File
@@ -42,25 +42,18 @@ public:
wivrn::to_headset::video_stream_data_shard::view_info_t view_info;
vk::ImageView image_view = nullptr;
vk::Image image = nullptr;
vk::Extent2D extent{};
vk::ImageLayout & current_layout;
vk::Semaphore semaphore = nullptr;
uint64_t * semaphore_val = nullptr;
};
const wivrn::to_headset::video_stream_description::item description;
protected:
decoder(const wivrn::to_headset::video_stream_description::item & description) :
description(description) {}
vk::Extent2D extent_; // Must be populated when sampler is set
public:
static std::shared_ptr<decoder> make(
vk::raii::Device &,
vk::raii::PhysicalDevice &,
uint32_t vk_queue_family_index,
const wivrn::to_headset::video_stream_description::item & description,
float fps,
const wivrn::to_headset::video_stream_description & description,
uint8_t stream_index,
std::weak_ptr<scenes::stream>,
shard_accumulator *);
@@ -72,10 +65,6 @@ public:
const to_headset::video_stream_data_shard::view_info_t & view_info) = 0;
virtual vk::Sampler sampler() = 0;
const vk::Extent2D extent()
{
return extent_;
}
static std::vector<wivrn::video_codec> supported_codecs();
};
+16 -8
View File
@@ -73,6 +73,7 @@ struct decoder::ffmpeg_blit_handle : public wivrn::decoder::blit_handle
const wivrn::to_headset::video_stream_data_shard::view_info_t & view_info,
vk::ImageView image_view,
vk::Image image,
vk::Extent2D extent,
vk::ImageLayout & current_layout,
int image_index,
wivrn::ffmpeg::decoder * self) :
@@ -81,6 +82,7 @@ struct decoder::ffmpeg_blit_handle : public wivrn::decoder::blit_handle
view_info,
image_view,
image,
extent,
current_layout,
},
image_index(image_index),
@@ -100,16 +102,19 @@ struct decoder::ffmpeg_blit_handle : public wivrn::decoder::blit_handle
decoder::decoder(
vk::raii::Device & device,
vk::raii::PhysicalDevice & physical_device,
const wivrn::to_headset::video_stream_description::item & description,
const wivrn::to_headset::video_stream_description & description,
uint8_t stream_index,
std::weak_ptr<scenes::stream> scene,
shard_accumulator * accumulator) :
wivrn::decoder(description),
device(device),
codec(nullptr, free_codec_context),
sws(nullptr, sws_freeContext),
weak_scene(scene),
accumulator(accumulator)
accumulator(accumulator),
extent{
.width = description.width,
.height = description.height / (stream_index == 2 ? 2u : 1u),
}
{
free_images.resize(image_count);
@@ -121,8 +126,8 @@ decoder::decoder(
.imageType = vk::ImageType::e2D,
.format = vk::Format::eA8B8G8R8SrgbPack32,
.extent = {
.width = description.width,
.height = description.height,
.width = extent.width,
.height = extent.height,
.depth = 1,
},
.mipLevels = 1,
@@ -139,7 +144,6 @@ decoder::decoder(
decoded_images[i].image = image_allocation(device, image_info, alloc_info);
decoded_images[i].image.map();
extent_ = vk::Extent2D{description.width, description.height};
vk::ImageSubresource resource;
resource.aspectMask = vk::ImageAspectFlagBits::eColor;
@@ -164,7 +168,7 @@ decoder::decoder(
decoded_images[i].current_layout = vk::ImageLayout::eUndefined;
}
auto avcodec = avcodec_find_decoder(codec_id(description.codec));
auto avcodec = avcodec_find_decoder(codec_id(description.codec[stream_index]));
if (avcodec == nullptr)
{
throw std::runtime_error{"avcodec_find_decoder failed"};
@@ -192,6 +196,8 @@ decoder::decoder(
void decoder::push_data(std::span<std::span<const uint8_t>> data, uint64_t frame_index, bool partial)
{
if (frame_index != this->frame_index)
packet.clear();
for (const auto & d: data)
packet.insert(packet.end(), d.begin(), d.end());
this->frame_index = frame_index;
@@ -231,7 +237,7 @@ void decoder::frame_completed(const wivrn::from_headset::feedback & feedback, co
if (!sws)
{
sws.reset(sws_getContext(frame->width, frame->height, (AVPixelFormat)frame->format, description.width, description.height, AV_PIX_FMT_RGB0, SWS_BILINEAR, nullptr, nullptr, nullptr));
sws.reset(sws_getContext(frame->width, frame->height, (AVPixelFormat)frame->format, extent.width, extent.height, AV_PIX_FMT_RGB0, SWS_BILINEAR, nullptr, nullptr, nullptr));
}
std::unique_lock lock(mutex);
@@ -257,6 +263,7 @@ void decoder::frame_completed(const wivrn::from_headset::feedback & feedback, co
view_info,
*decoded_images[index].image_view,
decoded_images[index].image,
extent,
decoded_images[index].current_layout,
index,
this);
@@ -267,6 +274,7 @@ void decoder::frame_completed(const wivrn::from_headset::feedback & feedback, co
void decoder::supported_codecs(std::vector<wivrn::video_codec> & res)
{
// As long as we do software decoding, prefer faster ones
res.push_back(wivrn::video_codec::h264);
res.push_back(wivrn::video_codec::h265);
res.push_back(wivrn::video_codec::av1);
+2 -1
View File
@@ -73,13 +73,14 @@ private:
uint64_t frame_index;
std::weak_ptr<scenes::stream> weak_scene;
shard_accumulator * accumulator;
const vk::Extent2D extent;
std::mutex mutex;
public:
decoder(vk::raii::Device & device,
vk::raii::PhysicalDevice & physical_device,
const wivrn::to_headset::video_stream_description::item & description,
const wivrn::to_headset::video_stream_description & description,
uint8_t stream_index,
std::weak_ptr<scenes::stream> scene,
shard_accumulator * accumulator);
+34 -39
View File
@@ -32,11 +32,12 @@ struct raw_blit_handle : public wivrn::decoder::blit_handle
const wivrn::to_headset::video_stream_data_shard::view_info_t & view_info,
vk::ImageView image_view,
vk::Image image,
vk::Extent2D extent,
vk::ImageLayout & current_layout,
vk::Semaphore semaphore,
uint64_t & semaphore_val,
std::atomic_bool & free) :
wivrn::decoder::blit_handle{feedback, view_info, image_view, image, current_layout, semaphore, &semaphore_val},
wivrn::decoder::blit_handle{feedback, view_info, image_view, image, extent, current_layout, semaphore, &semaphore_val},
free(free) {}
~raw_blit_handle()
{
@@ -46,8 +47,7 @@ struct raw_blit_handle : public wivrn::decoder::blit_handle
vk::raii::Sampler make_sampler(
vk::raii::Device & device,
vk::raii::SamplerYcbcrConversion & ycbcr_conversion,
to_headset::video_stream_description::channels_t channels)
vk::SamplerYcbcrConversion ycbcr_conversion)
{
vk::StructureChain info{
vk::SamplerCreateInfo{
@@ -60,17 +60,11 @@ vk::raii::Sampler make_sampler(
.maxAnisotropy = 1,
},
vk::SamplerYcbcrConversionInfo{
.conversion = *ycbcr_conversion,
.conversion = ycbcr_conversion,
},
};
switch (channels)
{
case wivrn::to_headset::video_stream_description::channels_t::colour:
break;
case wivrn::to_headset::video_stream_description::channels_t::alpha:
info.unlink<vk::SamplerYcbcrConversionInfo>();
break;
}
if (ycbcr_conversion == VK_NULL_HANDLE)
info.unlink<vk::SamplerYcbcrConversionInfo>();
return vk::raii::Sampler(device, info.get());
}
} // namespace
@@ -81,20 +75,18 @@ raw_decoder::raw_decoder(
vk::raii::Device & device,
vk::raii::PhysicalDevice & physical_device,
uint32_t vk_queue_family_index,
const wivrn::to_headset::video_stream_description::item & description,
const wivrn::to_headset::video_stream_description & description,
uint8_t stream_index,
std::weak_ptr<scenes::stream> scene,
shard_accumulator * accumulator) :
decoder(description),
device(device),
ycbcr_conversion(device,
{
.format = vk::Format::eG8B8R82Plane420Unorm,
.ycbcrModel = vk::SamplerYcbcrModelConversion(description.color_model.value_or(VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709)),
.ycbcrRange = vk::SamplerYcbcrRange(description.range.value_or(VK_SAMPLER_YCBCR_RANGE_ITU_FULL)),
.chromaFilter = vk::Filter::eNearest,
}),
sampler_(make_sampler(device, ycbcr_conversion, description.channels)),
ycbcr_conversion(stream_index == 2 ? nullptr : vk::raii::SamplerYcbcrConversion(device, {
.format = vk::Format::eG8B8R82Plane420Unorm,
.ycbcrModel = vk::SamplerYcbcrModelConversion::eYcbcr709,
.ycbcrRange = vk::SamplerYcbcrRange::eItuFull,
.chromaFilter = vk::Filter::eNearest,
})),
sampler_(make_sampler(device, *ycbcr_conversion)),
command_pool(device, vk::CommandPoolCreateInfo{
.flags = vk::CommandPoolCreateFlagBits::eResetCommandBuffer,
.queueFamilyIndex = vk_queue_family_index,
@@ -105,22 +97,24 @@ raw_decoder::raw_decoder(
})[0]
.release()),
fence(device, vk::FenceCreateInfo{.flags = vk::FenceCreateFlagBits::eSignaled}),
stream_index(stream_index),
extent{
.width = description.width,
.height = description.height / (stream_index == 2 ? 2u : 1u),
},
weak_scene(scene),
accumulator(accumulator)
{
extent_ = vk::Extent2D{
.width = description.width,
.height = description.height,
};
vk::DeviceSize buffer_size = description.width * description.height;
vk::DeviceSize buffer_size = extent.width * extent.height;
vk::Format format{};
switch (description.channels)
switch (stream_index)
{
case to_headset::video_stream_description::channels_t::colour:
buffer_size += (description.width * description.height) / 2;
case 0: // colour left
case 1: // colour right
buffer_size += buffer_size / 2;
format = vk::Format::eG8B8R82Plane420Unorm;
break;
case to_headset::video_stream_description::channels_t::alpha:
case 2: // alpha (monochrome)
format = vk::Format::eR8Unorm;
break;
}
@@ -148,8 +142,8 @@ raw_decoder::raw_decoder(
.imageType = vk::ImageType::e2D,
.format = format,
.extent = {
.width = description.width,
.height = description.height,
.width = extent.width,
.height = extent.height,
.depth = 1,
},
.mipLevels = 1,
@@ -220,6 +214,7 @@ void raw_decoder::frame_completed(
view_info,
*item->view_full,
item->image,
extent,
item->current_layout,
*item->semaphore,
item->semaphore_val,
@@ -263,20 +258,20 @@ void raw_decoder::frame_completed(
.layerCount = 1,
},
.imageExtent = {
.width = description.width,
.height = description.height,
.width = extent.width,
.height = extent.height,
.depth = 1,
},
},
vk::BufferImageCopy{
.bufferOffset = vk::DeviceSize(description.width * description.height),
.bufferOffset = vk::DeviceSize(extent.width * extent.height),
.imageSubresource = {
.aspectMask = vk::ImageAspectFlagBits::ePlane1,
.layerCount = 1,
},
.imageExtent = {
.width = description.width / 2u,
.height = description.height / 2u,
.width = extent.width / 2u,
.height = extent.height / 2u,
.depth = 1,
},
},
@@ -286,7 +281,7 @@ void raw_decoder::frame_completed(
input[0],
item->image,
item->current_layout,
description.channels == to_headset::video_stream_description::channels_t::colour ? 2 : 1,
stream_index ? 2 : 1,
regions.data());
vk::ImageMemoryBarrier barrier{
+4 -10
View File
@@ -48,6 +48,9 @@ private:
vk::CommandBuffer cmd;
vk::raii::Fence fence;
uint8_t stream_index;
const vk::Extent2D extent;
std::array<image, image_count> image_pool;
std::weak_ptr<scenes::stream> weak_scene;
@@ -57,13 +60,12 @@ private:
std::array<buffer_allocation, 2> input;
uint8_t * input_pos;
from_headset::feedback feedback;
to_headset::video_stream_data_shard::view_info_t view_info;
public:
raw_decoder(vk::raii::Device & device,
vk::raii::PhysicalDevice & physical_device,
uint32_t vk_queue_family_index,
const wivrn::to_headset::video_stream_description::item & description,
const wivrn::to_headset::video_stream_description & description,
uint8_t stream_index,
std::weak_ptr<scenes::stream> scene,
shard_accumulator * accumulator);
@@ -79,14 +81,6 @@ public:
return *sampler_;
}
vk::Extent2D image_size()
{
return {
description.width,
description.height,
};
}
static std::vector<wivrn::video_codec> supported_codecs();
private:
+3 -3
View File
@@ -55,7 +55,7 @@ static bool is_complete(const shard_set & shards)
const auto & frame = shards.data;
if (frame.empty())
return false;
if (not(frame.back() and frame.back()->flags & video_stream_data_shard::end_of_frame))
if (not(frame.back() and frame.back()->timing_info))
return false;
for (const auto & shard: frame)
if (not shard)
@@ -99,7 +99,7 @@ static void debug_why_not_sent(const shard_set & shards)
++missing;
}
bool end = frame.back() and frame.back()->flags & video_stream_data_shard::end_of_frame;
bool end = frame.back() and frame.back()->timing_info;
spdlog::info("frame {} was not sent with {} data shards, {}{} missing", frame_idx, data, end ? "" : "at least ", missing);
}
@@ -185,7 +185,7 @@ void shard_accumulator::try_submit_frame(uint16_t shard_idx)
for (size_t idx = shard_idx; idx < last_idx; ++idx)
payload.emplace_back(data_shards[idx]->payload);
bool frame_complete = last_idx == data_shards.size() and data_shards.back()->flags & video_stream_data_shard::end_of_frame;
bool frame_complete = last_idx == data_shards.size() and data_shards.back()->timing_info;
decoder_->push_data(payload, data_shards[shard_idx]->frame_idx, not frame_complete);
if (not frame_complete)
+2 -13
View File
@@ -81,11 +81,10 @@ public:
vk::raii::PhysicalDevice & physical_device,
xr::instance & instance,
uint32_t vk_queue_family_index,
const wivrn::to_headset::video_stream_description::item & description,
float fps,
const wivrn::to_headset::video_stream_description & description,
std::weak_ptr<scenes::stream> scene,
uint8_t stream_index) :
decoder_(decoder::make(device, physical_device, vk_queue_family_index, description, fps, stream_index, scene, this)),
decoder_(decoder::make(device, physical_device, vk_queue_family_index, description, stream_index, scene, this)),
current(stream_index),
next(stream_index),
weak_scene(scene),
@@ -96,21 +95,11 @@ public:
void push_shard(wivrn::to_headset::video_stream_data_shard &&);
auto & desc() const
{
return decoder_->description;
}
vk::Sampler sampler()
{
return decoder_->sampler();
}
const vk::Extent2D extent()
{
return decoder_->extent();
}
using blit_handle = decoder::blit_handle;
private:
+21 -16
View File
@@ -43,26 +43,31 @@ std::future<file_picker_result> file_picker::open()
open_doc.start([promise](int result_code, intent && data) mutable {
try
{
if (result_code != -1 /* Activity.RESULT_OK */)
return;
if (result_code == -1 /* Activity.RESULT_OK */)
{
auto uri = data.get_uri();
auto uri_string = (std::string)uri.call<jni::string>("toString");
auto uri = data.get_uri();
auto uri_string = (std::string)uri.call<jni::string>("toString");
jni::object<""> activity(application::native_app()->activity->clazz);
auto content_resolver = activity.call<jni::object<"android/content/ContentResolver">>("getContentResolver");
jni::object<""> activity(application::native_app()->activity->clazz);
auto content_resolver = activity.call<jni::object<"android/content/ContentResolver">>("getContentResolver");
content_resolver.call<void>("takePersistableUriPermission", uri, jni::Int{1} /* Intent.FLAG_GRANT_READ_URI_PERMISSION */);
content_resolver.call<void>("takePersistableUriPermission", uri, jni::Int{1} /* Intent.FLAG_GRANT_READ_URI_PERMISSION */);
auto pfd = content_resolver.call<jni::object<"android/os/ParcelFileDescriptor">>("openFileDescriptor", uri, jni::string{"r"});
int fd = pfd.call<int>("getFd");
auto pfd = content_resolver.call<jni::object<"android/os/ParcelFileDescriptor">>("openFileDescriptor", uri, jni::string{"r"});
int fd = pfd.call<int>("getFd");
// The file descriptor is owned by the ParcelFileDescriptor, dup it before
// passing it to mapped_file to ensure the original fd is not closed
promise->set_value(file_picker_result{
.path = uri_string,
.file = utils::mapped_file{fd},
});
// The file descriptor is owned by the ParcelFileDescriptor, dup it before
// passing it to mapped_file to ensure the original fd is not closed
promise->set_value({
.accepted = true,
.path = uri_string,
.file = utils::mapped_file{fd},
});
}
else
{
promise->set_value({.accepted = false});
}
}
catch (...)
{
+6
View File
@@ -23,8 +23,14 @@
struct file_picker_result
{
bool accepted = false;
std::filesystem::path path;
utils::mapped_file file;
operator bool() const
{
return accepted;
}
};
class file_picker
+25 -7
View File
@@ -319,15 +319,17 @@ std::string controller_name()
case model::pico_neo_3:
return "pico-neo3";
case model::pico_4:
case model::pico_4s: // TODO: split when we have the pico-4s 3d model
case model::pico_4_pro:
case model::pico_4_enterprise:
return "pico-4";
case model::pico_4s:
return "pico-4u";
case model::htc_vive_focus_3:
case model::htc_vive_focus_vision:
case model::htc_vive_xr_elite:
return "htc-vive-focus-3";
case model::samsung_galaxy_xr:
return "samsung-galaxyxr";
case model::lynx_r1:
case model::unknown:
return "generic-trigger-squeeze";
@@ -390,12 +392,6 @@ std::pair<glm::vec3, glm::quat> controller_offset(std::string_view profile, xr::
case xr::spaces::grip_right:
return {{0, -0.010, -0.025}, glm::angleAxis(glm::radians(-12.f), glm::vec3{1, 0, 0})};
case xr::spaces::aim_left:
return {{0, 0, 0.03}, {1, 0, 0, 0}};
case xr::spaces::aim_right:
return {{0, 0, 0.03}, {1, 0, 0, 0}};
default:
break;
}
@@ -425,6 +421,28 @@ std::pair<glm::vec3, glm::quat> controller_offset(std::string_view profile, xr::
break;
}
else if (profile == "pico-neo3")
switch (space)
{
case xr::spaces::grip_left:
case xr::spaces::grip_right:
return {{0, 0.005, -0.051}, glm::angleAxis(glm::radians(-29.400f), glm::vec3{1, 0, 0})};
default:
break;
}
else if (profile == "samsung-galaxyxr")
switch (space)
{
case xr::spaces::grip_left:
return {{-0.005, 0.000, 0.035}, {1, 0, 0, 0}};
case xr::spaces::grip_right:
return {{0.005, 0.000, 0.035}, {1, 0, 0, 0}};
default:
break;
}
return {{0, 0, 0}, {1, 0, 0, 0}};
}
+2 -2
View File
@@ -651,9 +651,9 @@ std::vector<imgui_context::controller_state> imgui_context::read_controllers_sta
}
}
if (current_aim_interaction == 0)
if (current_aim_interaction == 0 or not controller_position.first)
state.pointer_position = index_tip_position.first;
else if (current_aim_interaction == 1)
else if (current_aim_interaction == 1 or not index_tip_position.first)
state.pointer_position = controller_position.first;
else
{
+74 -6
View File
@@ -18,12 +18,10 @@
#include "scene_loader.h"
#include "application.h"
#include "gpu_buffer.h"
#include "image_loader.h"
#include "render/scene_components.h"
#include "render/vertex_layout.h"
#include "utils/contains.h"
#include "utils/files.h"
#include "utils/json_string.h"
#include "utils/mapped_file.h"
@@ -273,19 +271,45 @@ void write_vertex_attribute_aux(std::byte * output, size_t stride, int component
{
case 1:
for (size_t i = 0, n = input.size(); i < n; i++, output += stride)
*reinterpret_cast<glm::vec<1, T> *>(output) = glm::vec<1, T>(input[i].x);
*reinterpret_cast<glm::vec<1, T> *>(output) = input[i];
break;
case 2:
for (size_t i = 0, n = input.size(); i < n; i++, output += stride)
*reinterpret_cast<glm::vec<2, T> *>(output) = glm::vec<2, T>(input[i].x, input[i].y);
*reinterpret_cast<glm::vec<2, T> *>(output) = input[i];
break;
case 3:
for (size_t i = 0, n = input.size(); i < n; i++, output += stride)
*reinterpret_cast<glm::vec<3, T> *>(output) = glm::vec<3, T>(input[i].x, input[i].y, input[i].z);
*reinterpret_cast<glm::vec<3, T> *>(output) = input[i];
break;
case 4:
for (size_t i = 0, n = input.size(); i < n; i++, output += stride)
*reinterpret_cast<glm::vec<3, T> *>(output) = glm::vec<4, T>(input[i].x, input[i].y, input[i].z, input[i].w);
*reinterpret_cast<glm::vec<4, T> *>(output) = input[i];
break;
default:
abort();
}
}
template <typename T>
void write_vertex_attribute_aux(std::byte * output, size_t stride, int components, glm::vec4 value, size_t size)
{
switch (components)
{
case 1:
for (size_t i = 0, n = size; i < n; i++, output += stride)
*reinterpret_cast<glm::vec<1, T> *>(output) = value;
break;
case 2:
for (size_t i = 0, n = size; i < n; i++, output += stride)
*reinterpret_cast<glm::vec<2, T> *>(output) = value;
break;
case 3:
for (size_t i = 0, n = size; i < n; i++, output += stride)
*reinterpret_cast<glm::vec<3, T> *>(output) = value;
break;
case 4:
for (size_t i = 0, n = size; i < n; i++, output += stride)
*reinterpret_cast<glm::vec<4, T> *>(output) = value;
break;
default:
abort();
@@ -310,6 +334,24 @@ void write_vertex_attribute(std::vector<std::byte> & output, size_t offset, size
}
}
void write_vertex_attribute(std::vector<std::byte> & output, size_t offset, size_t stride, vk::Format format, glm::vec4 value, size_t size)
{
assert(output.size() >= size * stride);
switch (format)
{
case vk::Format::eR32Sfloat:
case vk::Format::eR32G32Sfloat:
case vk::Format::eR32G32B32Sfloat:
case vk::Format::eR32G32B32A32Sfloat:
write_vertex_attribute_aux<float>(output.data() + offset, stride, vk::componentCount(format), value, size);
return;
default:
return;
}
}
void copy_vertex_attributes(
const fastgltf::Asset & asset,
const fastgltf::Accessor & accessor,
@@ -322,6 +364,18 @@ void copy_vertex_attributes(
write_vertex_attribute(buffer, attribute.offset, binding.stride, attribute.format, read_vertex_attribute(asset, accessor));
}
void fill_vertex_attributes(
glm::vec4 value,
size_t size,
std::vector<std::byte> & buffer,
const vk::VertexInputBindingDescription & binding,
const vk::VertexInputAttributeDescription & attribute)
{
assert(buffer.size() >= size * binding.stride);
write_vertex_attribute(buffer, attribute.offset, binding.stride, attribute.format, value, size);
}
std::pair<size_t, std::vector<std::vector<std::byte>>> create_vertex_buffers(
const renderer::vertex_layout & layout,
const fastgltf::Asset & asset,
@@ -370,7 +424,20 @@ std::pair<size_t, std::vector<std::vector<std::byte>>> create_vertex_buffers(
gltf_attribute = primitive.findAttribute(name + "_0");
if (gltf_attribute == primitive.attributes.cend())
{
// If the attribute is not specified in the glTF, use the default value or 0 if none is found
static const std::unordered_map<std::string_view, glm::vec4> default_values = {
std::pair{"COLOR", glm::vec4{1, 1, 1, 1}}};
if (auto iter = default_values.find(name); iter != default_values.end())
fill_vertex_attributes(iter->second, vertex_count, buffer, binding, attribute);
else
{
// The buffer is already initialized at 0
}
continue;
}
}
const fastgltf::Accessor & accessor = asset.accessors.at(gltf_attribute->accessorIndex);
@@ -842,6 +909,7 @@ public:
int binding;
// Attributes that affect the vertices position go in a different buffer
if (semantic == "POSITION" or
semantic == "JOINTS" or
semantic == "WEIGHTS")
-364
View File
@@ -1,364 +0,0 @@
/*
* WiVRn VR streaming
* Copyright (C) 2025 Patrick Nicolas <patricknicolas@laposte.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "blitter.h"
#include "application.h"
#include "utils/ranges.h"
#include "vk/pipeline.h"
#include "vk/shader.h"
#include "vk/specialization_constants.h"
#include <format>
#include <ranges>
#include <spdlog/spdlog.h>
namespace wivrn
{
static const uint32_t num_views = 2;
blitter::blitter(vk::raii::Device & device, size_t view) :
device(device), view(view)
{
}
void blitter::reset(const to_headset::video_stream_description & desc)
{
using channels_t = to_headset::video_stream_description::channels_t;
this->desc = desc;
current = {};
target = image_allocation();
image_view = nullptr;
rp = nullptr;
fb = nullptr;
sampler = nullptr;
pipelines.clear();
passthrough_rgb = passthrough_a = -1;
auto w = desc.width / num_views;
for (auto [i, item]: utils::enumerate(desc.items))
{
if (item.offset_x <= view * w and
item.offset_y == 0 and
item.offset_x + item.width * item.subsampling >= (view + 1) * w and
item.height * item.subsampling >= desc.height)
{
spdlog::info("Stream {} is eligible for blit-less path on view {}", i, view);
switch (item.channels)
{
case channels_t::colour:
passthrough_rgb = i;
break;
case channels_t::alpha:
passthrough_a = i;
break;
}
const bool alpha = item.channels == to_headset::video_stream_description::channels_t::alpha;
auto & r = alpha ? current.rect_a : current.rect_rgb;
r = vk::Rect2D{
.offset = {
.x = int32_t(view * w) - item.offset_x,
.y = 0,
},
};
}
}
if (passthrough_rgb != -1 and passthrough_a != -1)
return;
target = image_allocation(
device,
vk::ImageCreateInfo{
.imageType = vk::ImageType::e2D,
.format = vk::Format::eB8G8R8A8Srgb,
.extent = {
.width = w,
.height = desc.height,
.depth = 1,
},
.mipLevels = 1,
.arrayLayers = 1,
.usage = vk::ImageUsageFlagBits::eSampled | vk::ImageUsageFlagBits::eColorAttachment,
},
{
.usage = VMA_MEMORY_USAGE_AUTO,
},
std::format("blit image {}", view));
image_view = device.createImageView(vk::ImageViewCreateInfo{
.image = vk::Image(target),
.viewType = vk::ImageViewType::e2D,
.format = target.info().format,
.subresourceRange = {
.aspectMask = vk::ImageAspectFlagBits::eColor,
.levelCount = 1,
.layerCount = 1,
}});
// render pass
{
vk::AttachmentReference color_ref{
.attachment = 0,
.layout = vk::ImageLayout::eColorAttachmentOptimal,
};
vk::SubpassDescription subpass{
.pipelineBindPoint = vk::PipelineBindPoint::eGraphics,
.colorAttachmentCount = 1,
.pColorAttachments = &color_ref,
};
vk::AttachmentDescription color_desc{
.format = target.info().format,
.loadOp = vk::AttachmentLoadOp::eDontCare,
.finalLayout = vk::ImageLayout::eShaderReadOnlyOptimal,
};
rp = device.createRenderPass(vk::RenderPassCreateInfo{
.attachmentCount = 1,
.pAttachments = &color_desc,
.subpassCount = 1,
.pSubpasses = &subpass,
});
}
fb = device.createFramebuffer(
vk::FramebufferCreateInfo{
.renderPass = *rp,
.attachmentCount = 1,
.pAttachments = &*image_view,
.width = w,
.height = desc.height,
.layers = 1,
});
sampler = device.createSampler(vk::SamplerCreateInfo{
.magFilter = vk::Filter::eLinear,
.minFilter = vk::Filter::eLinear,
.addressModeU = vk::SamplerAddressMode::eClampToBorder,
.addressModeV = vk::SamplerAddressMode::eClampToBorder,
.addressModeW = vk::SamplerAddressMode::eClampToBorder,
.borderColor = vk::BorderColor::eFloatOpaqueBlack,
});
pipelines.resize(desc.items.size());
for (auto [i, item]: utils::enumerate(desc.items))
{
pipelines[i].used = item.offset_x < (view + 1) * w and
item.offset_x + item.width * item.subsampling > view * w;
}
current.rgb = *image_view;
current.sampler_rgb = *sampler;
current.rect_rgb = vk::Rect2D{.extent = {w, desc.height}};
current.layout_rgb = vk::ImageLayout::eShaderReadOnlyOptimal;
}
void blitter::begin(vk::raii::CommandBuffer & cmd)
{
assert(not desc.items.empty());
if (*fb == VK_NULL_HANDLE)
{
current.rgb = nullptr;
current.a = nullptr;
current.sampler_rgb = nullptr;
current.sampler_a = nullptr;
return;
}
current.rgb = *image_view;
current.sampler_rgb = *sampler;
cmd.beginRenderPass(
{
.renderPass = *rp,
.framebuffer = *fb,
.renderArea = {
.offset = {0, 0},
.extent = {target.info().extent.width, target.info().extent.height},
},
},
vk::SubpassContents::eInline);
}
void blitter::push_image(vk::raii::CommandBuffer & cmd, uint8_t stream, vk::Sampler sampler, const vk::Extent2D & extent_, vk::ImageView image, vk::ImageLayout layout)
{
if (stream == passthrough_rgb)
{
current.rgb = image;
current.sampler_rgb = sampler;
current.layout_rgb = layout;
current.rect_rgb.extent = vk::Extent2D{
extent_.width * desc.items[stream].subsampling,
extent_.height * desc.items[stream].subsampling,
};
return;
}
if (stream == passthrough_a)
{
current.a = image;
current.sampler_a = sampler;
current.layout_a = layout;
current.rect_a.extent = vk::Extent2D{
extent_.width * desc.items[stream].subsampling,
extent_.height * desc.items[stream].subsampling,
};
return;
}
if (pipelines.empty())
return;
assert(stream < pipelines.size());
auto & p = pipelines[stream];
if (not p.used)
return;
const auto & extent = target.info().extent;
const auto & description = desc.items[stream];
if (not *p.pipeline)
{
const bool alpha = description.channels == to_headset::video_stream_description::channels_t::alpha;
vk::DescriptorSetLayoutBinding sampler_layout_binding{
.binding = 0,
.descriptorType = vk::DescriptorType::eCombinedImageSampler,
.descriptorCount = 1,
.stageFlags = vk::ShaderStageFlagBits::eFragment,
.pImmutableSamplers = &sampler,
};
p.set_layout = device.createDescriptorSetLayout(vk::DescriptorSetLayoutCreateInfo{
.flags = vk::DescriptorSetLayoutCreateFlagBits::ePushDescriptorKHR,
.bindingCount = 1,
.pBindings = &sampler_layout_binding,
});
auto vert_constants = make_specialization_constants(
float(description.width) / extent_.width,
float(description.height) / extent_.height);
auto frag_constants = make_specialization_constants(
VkBool32(alpha));
// Create graphics pipeline
auto vertex_shader = load_shader(device, "stream.vert");
auto fragment_shader = load_shader(device, "stream.frag");
p.layout = device.createPipelineLayout(vk::PipelineLayoutCreateInfo{
.setLayoutCount = 1,
.pSetLayouts = &*p.set_layout,
});
vk::pipeline_builder pipeline_info{
.Stages = {{
.stage = vk::ShaderStageFlagBits::eVertex,
.module = *vertex_shader,
.pName = "main",
.pSpecializationInfo = vert_constants,
},
{
.stage = vk::ShaderStageFlagBits::eFragment,
.module = *fragment_shader,
.pName = "main",
.pSpecializationInfo = frag_constants,
}},
.VertexBindingDescriptions = {},
.VertexAttributeDescriptions = {},
.InputAssemblyState = {{
.topology = vk::PrimitiveTopology::eTriangleStrip,
}},
// With vk::DynamicState::eViewport, vk::DynamicState::eScissor the number of viewports
// and scissors is still used, put a vector with one element
.Viewports = {{}},
.Scissors = {{}},
.RasterizationState = {{
.polygonMode = vk::PolygonMode::eFill,
.lineWidth = 1,
}},
.MultisampleState = {{
.rasterizationSamples = vk::SampleCountFlagBits::e1,
}},
.ColorBlendAttachments = {
{.colorWriteMask = alpha ? vk::ColorComponentFlagBits::eA
: vk::ColorComponentFlagBits::eA | vk::ColorComponentFlagBits::eR | vk::ColorComponentFlagBits::eG | vk::ColorComponentFlagBits::eB}},
.DynamicStates = {vk::DynamicState::eViewport, vk::DynamicState::eScissor},
.layout = *p.layout,
.renderPass = *rp,
.subpass = 0,
};
p.pipeline = device.createGraphicsPipeline(application::get_pipeline_cache(), pipeline_info);
spdlog::info("Created blit pipeline for stream {}, view {}", stream, view);
}
cmd.bindPipeline(vk::PipelineBindPoint::eGraphics, *p.pipeline);
vk::DescriptorImageInfo image_info{
.imageView = image,
.imageLayout = layout,
};
cmd.pushDescriptorSetKHR(
vk::PipelineBindPoint::eGraphics,
*p.layout,
0,
vk::WriteDescriptorSet{
.dstBinding = 0,
.descriptorCount = 1,
.descriptorType = vk::DescriptorType::eCombinedImageSampler,
.pImageInfo = &image_info,
});
int x0 = description.offset_x - view * extent.width;
int y0 = description.offset_y;
int x1 = x0 + description.width * description.subsampling;
int y1 = y0 + description.height * description.subsampling;
cmd.setViewport(
0,
vk::Viewport{
.x = (float)x0,
.y = (float)y0,
.width = float(description.width * description.subsampling),
.height = float(description.height * description.subsampling),
.minDepth = 0,
.maxDepth = 1,
});
x0 = std::clamp<int>(x0, 0, extent.width);
x1 = std::clamp<int>(x1, 0, extent.width);
y0 = std::clamp<int>(y0, 0, extent.height);
y1 = std::clamp<int>(y1, 0, extent.height);
cmd.setScissor(
0,
vk::Rect2D{
.offset = {.x = x0, .y = y0},
.extent = {.width = uint32_t(x1 - x0), .height = uint32_t(y1 - y0)},
});
cmd.draw(3, 1, 0, 0);
}
blitter::output blitter::end(vk::raii::CommandBuffer & cmd)
{
if (*fb)
cmd.endRenderPass();
return current;
}
} // namespace wivrn
-72
View File
@@ -1,72 +0,0 @@
/*
* WiVRn VR streaming
* Copyright (C) 2025 Patrick Nicolas <patricknicolas@laposte.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once
#include "vk/allocation.h"
#include "wivrn_packets.h"
#include <vulkan/vulkan_raii.hpp>
namespace wivrn
{
class blitter
{
public:
struct output
{
vk::ImageView rgb;
vk::Sampler sampler_rgb;
vk::Rect2D rect_rgb;
vk::ImageLayout layout_rgb;
vk::ImageView a;
vk::Sampler sampler_a;
vk::Rect2D rect_a;
vk::ImageLayout layout_a;
};
private:
vk::raii::Device & device;
size_t view;
to_headset::video_stream_description desc;
// indices to simply passthrough, if -1 image needs to be blitted
int passthrough_rgb = -1;
int passthrough_a = -1;
image_allocation target;
vk::raii::ImageView image_view = nullptr;
vk::raii::RenderPass rp = nullptr;
vk::raii::Framebuffer fb = nullptr;
vk::raii::Sampler sampler = nullptr;
struct pipeline_t
{
vk::raii::DescriptorSetLayout set_layout = nullptr;
vk::raii::PipelineLayout layout = nullptr;
vk::raii::Pipeline pipeline = nullptr;
bool used = false; // true if we need this image for blitting
};
std::vector<pipeline_t> pipelines;
output current;
public:
blitter(vk::raii::Device & device, size_t view);
void reset(const to_headset::video_stream_description & desc);
void begin(vk::raii::CommandBuffer &);
void push_image(vk::raii::CommandBuffer & buf, uint8_t stream, vk::Sampler sampler, const vk::Extent2D &, vk::ImageView image, vk::ImageLayout);
output end(vk::raii::CommandBuffer &);
};
} // namespace wivrn
+14 -5
View File
@@ -1231,8 +1231,6 @@ void scenes::lobby::on_focused()
},
};
face_tracker = xr::make_face_tracker(instance, system, session);
// 0.4mm / pixel
std::vector<imgui_context::viewport> vps{
{
@@ -1283,11 +1281,22 @@ void scenes::lobby::on_focused()
vps,
image_cache);
supported_codecs = wivrn::decoder::supported_codecs();
auto t = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now());
auto tm = std::localtime(&t);
std::string image = tm->tm_mon == 5 ? "wivrn-pride" : "wivrn";
about_picture = imgui_ctx->load_texture("assets://" + image + ".ktx2");
switch (tm->tm_mon)
{
case 5:
about_picture = imgui_ctx->load_texture("assets://wivrn-pride.ktx2");
break;
case 11:
about_picture = imgui_ctx->load_texture("assets://wivrn-christmas.ktx2");
break;
default:
about_picture = imgui_ctx->load_texture("assets://wivrn.ktx2");
break;
}
default_environment_screenshot = imgui_ctx->load_texture("assets://default-environment.ktx2");
+3
View File
@@ -134,6 +134,9 @@ class lobby : public scene_impl<lobby>
tab current_tab = tab::server_list;
tab last_current_tab = tab::server_list;
int optional_feature_index = 0; // Which step of the first run screen are we in
std::vector<wivrn::video_codec> supported_codecs;
ImTextureID about_picture;
virtual_keyboard keyboard;
+159 -38
View File
@@ -32,12 +32,14 @@
#include "utils/i18n.h"
#include "utils/mapped_file.h"
#include "utils/overloaded.h"
#if WIVRN_CLIENT_DEBUG_MENU
#include "utils/ranges.h"
#endif
#include "version.h"
#include "xr/body_tracker.h"
#include <algorithm>
#include <cassert>
#include <chrono>
#include <chrono> // IWYU pragma: keep
#include <entt/entity/fwd.hpp>
#include <fastgltf/math.hpp>
#include <fastgltf/types.hpp>
@@ -566,6 +568,7 @@ void scenes::lobby::gui_settings()
}
ImGui::EndCombo();
}
imgui_ctx->vibrate_on_hover();
}
if (instance.has_extension(XR_FB_DISPLAY_REFRESH_RATE_EXTENSION_NAME))
@@ -642,20 +645,21 @@ void scenes::lobby::gui_settings()
imgui_ctx->vibrate_on_hover();
}
// Render resolution
{
const auto current = config.resolution_scale;
const auto width = stream_view.recommendedImageRectWidth;
const auto height = stream_view.recommendedImageRectHeight;
auto intScale = int(current * 100);
auto intScale = int(current * 10);
const auto slider = ImGui::SliderInt(
_("Resolution scale").append("##resolution_scale").c_str(),
_("Render resolution").append("##resolution_scale").c_str(),
&intScale,
50,
350,
fmt::format(_F("%d%% - {}x{} per eye"), int(width * current), int(height * current)).c_str());
5,
config.extended_config ? 35 : 15,
fmt::format(_F("{}%% - {}x{} per eye"), intScale * 10, int(width * current), int(height * current)).c_str());
if (slider)
{
config.resolution_scale = intScale * 0.01;
config.resolution_scale = intScale * 0.1;
config.save();
}
imgui_ctx->vibrate_on_hover();
@@ -667,6 +671,113 @@ void scenes::lobby::gui_settings()
}
}
// foveation
{
const int step = 10;
const auto current = config.get_stream_scale();
int intval = round((1 - current) * 100 / step);
const auto slider = ImGui::SliderInt(
_("Foveated encoding").append("##stream_scale").c_str(),
&intval,
0,
100 / step,
fmt::format(_F("{}%%"), intval * step).c_str());
if (slider)
{
// clamp out of the slider to have the 50% value centered
intval = std::clamp(intval,
config.extended_config ? 0 : 30 / step,
80 / step);
config.set_stream_scale(1 - intval * step * 0.01);
config.save();
}
if (ImGui::IsItemHovered())
{
if (config.check_feature(feature::eye_gaze))
imgui_ctx->tooltip(_("Higher values focus image quality where you look at,\n"
"improving latency, power efficiency and quality."));
else
imgui_ctx->tooltip(_("Higher values focus image quality at the center,\n"
"improving latency, power efficiency and quality."));
}
imgui_ctx->vibrate_on_hover();
}
{
auto codec_name = [](const std::optional<wivrn::video_codec> codec) {
if (not codec)
return _C("Codec", "Automatic");
switch (*codec)
{
case wivrn::h264:
return _C("Codec", "H.264");
case wivrn::h265:
return _C("Codec", "H.265");
case wivrn::av1:
return _C("Codec", "AV1");
case wivrn::raw:
break;
}
assert(false);
__builtin_unreachable();
};
if (ImGui::BeginCombo(_S("Codec"), codec_name(config.codec).c_str()))
{
if (ImGui::Selectable(codec_name({}).c_str(), not config.codec))
{
config.codec = std::nullopt;
config.save();
}
for (auto codec: supported_codecs)
{
// don't show raw in GUI
if (codec == wivrn::raw)
continue;
if (ImGui::Selectable(codec_name(codec).c_str(), config.codec == codec))
{
config.codec = codec;
config.save();
}
}
ImGui::EndCombo();
}
imgui_ctx->vibrate_on_hover();
if (config.codec == wivrn::video_codec::av1 or config.codec == wivrn::video_codec::h265)
{
ImGui::SameLine(0.f, 10.f);
bool ten_bit = config.bit_depth == 10;
if (ImGui::Checkbox(_S("10-bit"), &ten_bit))
{
config.bit_depth = ten_bit ? 10 : 8;
config.save();
}
imgui_ctx->vibrate_on_hover();
}
}
// Bitrate
{
const int mb = 1'000'000;
const auto current = config.bitrate_bps;
auto val = int(current / mb);
const auto slider = ImGui::SliderInt(
_("Bitrate").append("##bitrate").c_str(),
&val,
1,
config.max_bitrate() / mb,
fmt::format(_F("{}Mbit/s"), val).c_str());
if (slider)
{
config.bitrate_bps = val * mb;
config.save();
}
imgui_ctx->vibrate_on_hover();
}
if (instance.has_extension(XR_EXT_PERFORMANCE_SETTINGS_EXTENSION_NAME))
{
if (ImGui::Checkbox(_S("High power mode"), &config.high_power_mode))
@@ -697,8 +808,8 @@ void scenes::lobby::gui_settings()
ImGui::Unindent();
ImGui::EndDisabled();
}
if (system.hand_tracking_supported())
{
ImGui::BeginDisabled(not system.hand_tracking_supported());
bool enabled = config.check_feature(feature::hand_tracking);
if (ImGui::Checkbox(_S("Enable hand tracking"), &enabled))
{
@@ -707,10 +818,9 @@ void scenes::lobby::gui_settings()
imgui_ctx->vibrate_on_hover();
if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled) and (ImGui::GetItemFlags() & ImGuiItemFlags_Disabled))
imgui_ctx->tooltip(_("This feature is not supported by your headset"));
ImGui::EndDisabled();
}
if (application::get_eye_gaze_supported())
{
ImGui::BeginDisabled(not application::get_eye_gaze_supported());
bool enabled = config.check_feature(feature::eye_gaze);
if (ImGui::Checkbox(_S("Enable eye tracking"), &enabled))
{
@@ -719,30 +829,26 @@ void scenes::lobby::gui_settings()
imgui_ctx->vibrate_on_hover();
if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled) and (ImGui::GetItemFlags() & ImGuiItemFlags_Disabled))
imgui_ctx->tooltip(_("This feature is not supported by your headset"));
ImGui::EndDisabled();
}
if (system.face_tracker_supported() != xr::face_tracker_type::none)
{
ImGui::BeginDisabled(std::holds_alternative<std::monostate>(face_tracker));
bool enabled = config.check_feature(feature::face_tracking);
if (ImGui::Checkbox(_S("Enable face tracking"), &enabled))
{
config.set_feature(feature::face_tracking, enabled);
}
ImGui::EndDisabled();
if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled) and (ImGui::GetItemFlags() & ImGuiItemFlags_Disabled))
imgui_ctx->tooltip(_("This feature is not supported by your headset"));
imgui_ctx->vibrate_on_hover();
}
auto body_tracker = system.body_tracker_supported();
if (auto body_tracker = system.body_tracker_supported(); body_tracker != xr::body_tracker_type::none)
{
ImGui::BeginDisabled(body_tracker == xr::body_tracker_type::none);
bool enabled = config.check_feature(feature::body_tracking);
if (ImGui::Checkbox(_S("Enable body tracking"), &enabled))
{
config.set_feature(feature::body_tracking, enabled);
}
ImGui::EndDisabled();
if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled))
{
if (ImGui::GetItemFlags() & ImGuiItemFlags_Disabled)
@@ -757,31 +863,32 @@ void scenes::lobby::gui_settings()
}
imgui_ctx->vibrate_on_hover();
}
if (body_tracker == xr::body_tracker_type::fb)
{
ImGui::BeginDisabled(not config.check_feature(feature::body_tracking));
ImGui::Indent();
if (ImGui::Checkbox(_S("Enable lower body tracking"), &config.fb_lower_body))
{
config.save();
}
imgui_ctx->vibrate_on_hover();
if (ImGui::IsItemHovered())
imgui_ctx->tooltip(_("Estimate lower body joint positions using Generative Legs\nRequires 'Hand and body tracking' to be enabled in the Quest movement tracking settings"));
ImGui::BeginDisabled(not config.fb_lower_body);
if (ImGui::Checkbox(_S("Enable hip tracking"), &config.fb_hip))
if (body_tracker == xr::body_tracker_type::fb)
{
config.save();
}
imgui_ctx->vibrate_on_hover();
if (ImGui::IsItemHovered())
imgui_ctx->tooltip(_("Only takes affect with lower body tracking enabled\nMay be desired when using another source of hip tracking"));
ImGui::EndDisabled();
ImGui::BeginDisabled(not config.check_feature(feature::body_tracking));
ImGui::Indent();
if (ImGui::Checkbox(_S("Enable lower body tracking"), &config.fb_lower_body))
{
config.save();
}
imgui_ctx->vibrate_on_hover();
if (ImGui::IsItemHovered())
imgui_ctx->tooltip(_("Estimate lower body joint positions using Generative Legs\nRequires 'Hand and body tracking' to be enabled in the Quest movement tracking settings"));
ImGui::Unindent();
ImGui::EndDisabled();
ImGui::BeginDisabled(not config.fb_lower_body);
if (ImGui::Checkbox(_S("Enable hip tracking"), &config.fb_hip))
{
config.save();
}
imgui_ctx->vibrate_on_hover();
if (ImGui::IsItemHovered())
imgui_ctx->tooltip(_("Only takes affect with lower body tracking enabled\nMay be desired when using another source of hip tracking"));
ImGui::EndDisabled();
ImGui::Unindent();
ImGui::EndDisabled();
}
}
{
@@ -791,6 +898,13 @@ void scenes::lobby::gui_settings()
imgui_ctx->tooltip(_("Enables the configuration window to be shown while the game is streaming.\nIf enabled, the window is activated by pressing both thumbsticks."));
}
{
ImGui::Checkbox(_S("Extended configuration values"), &config.extended_config);
imgui_ctx->vibrate_on_hover();
if (ImGui::IsItemHovered())
imgui_ctx->tooltip(_("Allows unsafe configuration values, use at your own risk."));
}
ImGui::PopStyleVar(); // ImGuiStyleVar_ItemSpacing
}
@@ -1156,6 +1270,8 @@ void scenes::lobby::gui_first_run()
current_tab = tab::server_list;
config.first_run = false;
config.save();
ImGui::PopStyleVar(); // ImGuiStyleVar_ItemSpacing
return;
}
ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding, 10);
@@ -1422,6 +1538,7 @@ static const char * get_face_icon(XrTime predicted_display_time, xr::face_tracke
const char * result = nullptr;
std::visit(utils::overloaded{
[](std::monostate &) {},
[&](xr::android_face_tracker &) { result = ICON_FA_FACE_SMILE_WINK; },
[&](xr::htc_face_tracker &) { result = ICON_FA_FACE_SMILE_WINK; },
[&](auto & ft) {
ft.get_weights(predicted_display_time, expression);
@@ -1504,6 +1621,10 @@ void scenes::lobby::draw_features_status(XrTime predicted_display_time)
.icon_disabled = ICON_FA_FACE_MEH_BLANK,
});
}
else if (system.face_tracker_supported() != xr::face_tracker_type::none and config.check_feature(feature::face_tracking))
{
face_tracker = xr::make_face_tracker(instance, system, session);
}
if (system.body_tracker_supported() != xr::body_tracker_type::none)
{
+11 -7
View File
@@ -62,8 +62,8 @@ void scenes::lobby::save_environment_json()
<< ",\"size\":" << model.size;
// TODO only if not the default value
ss << ",\"local_screenshot\":" << json_string(model.local_screenshot_path);
ss << ",\"local_path\":" << json_string(model.local_gltf_path);
ss << ",\"local_screenshot\":" << json_string(model.local_screenshot_path.string());
ss << ",\"local_path\":" << json_string(model.local_gltf_path.string());
ss << "},";
}
if (not empty)
@@ -196,13 +196,18 @@ void scenes::lobby::update_file_picker()
try
{
load_environment_status = "";
file_picker_result picked_file = lobby_file_picker_future.get();
if (not picked_file)
return;
future_environment = utils::async<std::pair<std::string, std::shared_ptr<entt::registry>>, float>(
[this](auto token, file_picker_result environment) {
[this, picked_file = std::move(picked_file)](auto token) {
auto t = std::chrono::system_clock::now();
auto local_path = application::get_cache_path() / fmt::format("local-{:%F-%T}.glb", t);
auto local_screenshot_path = application::get_cache_path() / fmt::format("local-{:%F-%T}.png", t);
utils::write_whole_file(local_path, (std::span<const std::byte>)environment.file);
utils::write_whole_file(local_path, (std::span<const std::byte>)picked_file.file);
environment_model model{
.name = _S("Locally loaded environment"),
@@ -210,7 +215,7 @@ void scenes::lobby::update_file_picker()
.description = "",
.screenshot_url = "",
.gltf_url = fmt::format("local-{:%F-%T}", t), // Used as key
.size = environment.file.size(),
.size = picked_file.file.size(),
.local_screenshot_path = local_screenshot_path,
.local_gltf_path = local_path,
};
@@ -287,8 +292,7 @@ void scenes::lobby::update_file_picker()
write_image(device, queue, queue_family_index, local_screenshot_path, output);
return std::make_pair(local_path, env);
},
lobby_file_picker_future.get());
});
}
catch (std::exception & e)
{
+123 -116
View File
@@ -153,9 +153,11 @@ static const std::array supported_depth_formats{
scenes::stream::stream(std::string server_name, scene & parent_scene) :
scene_impl<stream>(supported_color_formats, supported_depth_formats, parent_scene),
apps{*this, std::move(server_name)},
blitters{blitter(device, 0), blitter(device, 1)}
apps{*this, std::move(server_name)}
{
auto views = system.view_configuration_views(viewconfig);
width = views[0].recommendedImageRectWidth;
height = views[0].recommendedImageRectHeight;
}
static from_headset::visibility_mask_changed::masks get_visibility_mask(xr::instance & inst, xr::session & session, int view)
@@ -198,31 +200,34 @@ std::shared_ptr<scenes::stream> scenes::stream::create(std::unique_ptr<wivrn_ses
.variant = application::get_messages_info().variant,
};
auto view = self->system.view_configuration_views(self->viewconfig)[0];
view = override_view(view, guess_model());
auto resolution_scale = application::get_config().resolution_scale;
view.recommendedImageRectWidth *= resolution_scale;
view.recommendedImageRectHeight *= resolution_scale;
info.recommended_eye_width = view.recommendedImageRectWidth;
info.recommended_eye_height = view.recommendedImageRectHeight;
auto [flags, views] = self->session.locate_views(
XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO,
self->instance.now(),
application::space(xr::spaces::view));
assert(views.size() == info.fov.size());
for (auto [i, j]: std::views::zip(views, info.fov))
{
j = i.fov;
auto [flags, views] = self->session.locate_views(
XR_VIEW_CONFIGURATION_TYPE_PRIMARY_STEREO,
self->instance.now(),
application::space(xr::spaces::view));
assert(views.size() == info.fov.size());
for (auto [i, j]: std::views::zip(views, info.fov))
j = i.fov;
}
const auto & config = application::get_config();
{
auto view = self->system.view_configuration_views(self->viewconfig)[0];
view = override_view(view, guess_model());
info.render_eye_width = view.recommendedImageRectWidth * config.resolution_scale;
info.render_eye_height = view.recommendedImageRectHeight * config.resolution_scale;
}
{
auto scale = config.get_stream_scale();
info.stream_eye_width = info.render_eye_width * scale;
info.stream_eye_height = info.render_eye_height * scale;
}
if (self->instance.has_extension(XR_FB_DISPLAY_REFRESH_RATE_EXTENSION_NAME))
{
info.available_refresh_rates = self->session.get_refresh_rates();
@@ -231,13 +236,13 @@ std::shared_ptr<scenes::stream> scenes::stream::create(std::unique_ptr<wivrn_ses
{
if (config.preferred_refresh_rate and (config.preferred_refresh_rate == 0 or utils::contains(info.available_refresh_rates, *config.preferred_refresh_rate)))
{
info.preferred_refresh_rate = *config.preferred_refresh_rate;
info.minimum_refresh_rate = config.minimum_refresh_rate.value_or(0);
info.settings.preferred_refresh_rate = *config.preferred_refresh_rate;
info.settings.minimum_refresh_rate = config.minimum_refresh_rate.value_or(0);
}
else
{
// Default to highest refresh rate
info.preferred_refresh_rate = info.available_refresh_rates.back();
info.settings.preferred_refresh_rate = info.available_refresh_rates.back();
}
}
}
@@ -246,9 +251,11 @@ std::shared_ptr<scenes::stream> scenes::stream::create(std::unique_ptr<wivrn_ses
{
spdlog::warn("Unable to detect refresh rates");
info.available_refresh_rates = {guessed_fps};
info.preferred_refresh_rate = guessed_fps;
info.settings.preferred_refresh_rate = guessed_fps;
}
info.settings.bitrate_bps = config.bitrate_bps;
info.hand_tracking = config.check_feature(feature::hand_tracking);
info.eye_gaze = config.check_feature(feature::eye_gaze);
@@ -259,6 +266,9 @@ std::shared_ptr<scenes::stream> scenes::stream::create(std::unique_ptr<wivrn_ses
case xr::face_tracker_type::none:
info.face_tracking = from_headset::face_type::none;
break;
case xr::face_tracker_type::android:
info.face_tracking = from_headset::face_type::android;
break;
case xr::face_tracker_type::fb:
case xr::face_tracker_type::pico:
info.face_tracking = from_headset::face_type::fb2;
@@ -296,7 +306,22 @@ std::shared_ptr<scenes::stream> scenes::stream::create(std::unique_ptr<wivrn_ses
if (not(config.check_feature(feature::microphone)))
info.microphone = {};
info.supported_codecs = decoder::supported_codecs();
if (config.codec)
{
info.supported_codecs = {*config.codec};
switch (*config.codec)
{
case h264:
case raw:
break;
case h265:
case av1:
info.bit_depth = config.bit_depth;
}
}
else
info.supported_codecs = decoder::supported_codecs();
return info;
}());
@@ -398,11 +423,6 @@ void scenes::stream::on_focused()
{
gui_status_last_change = instance.now();
auto views = system.view_configuration_views(viewconfig);
// stream_view = override_view(views[0], guess_model());
width = views[0].recommendedImageRectWidth;
height = views[0].recommendedImageRectHeight;
std::string profile = controller_name();
input.emplace(
*this,
@@ -478,16 +498,13 @@ void scenes::stream::on_focused()
}
recenter_left = get_action("recenter_left").first;
recenter_right = get_action("recenter_right").first;
foveation_pitch = get_action("foveation_pitch").first;
settings_adjust = get_action("settings_adjust").first;
foveation_distance = get_action("foveation_distance").first;
foveation_ok = get_action("foveation_ok").first;
foveation_cancel = get_action("foveation_cancel").first;
assert(video_stream_description);
std::unique_lock lock(decoder_mutex);
setup_reprojection_swapchain(
video_stream_description->defoveated_width / view_count,
video_stream_description->defoveated_height);
if (application::get_config().high_power_mode)
{
@@ -542,9 +559,7 @@ void scenes::stream::push_blit_handle(shard_accumulator * decoder, std::shared_p
std::swap(handle, decoders[stream].latest_frames[handle->feedback.frame_index % decoders[stream].latest_frames.size()]);
}
if (state_ != state::streaming and std::ranges::all_of(decoders, [](accumulator_images & i) {
return i.alpha() or not i.empty();
}))
if (state_ != state::streaming and not(decoders[0].empty() and decoders[1].empty()))
{
state_ = state::streaming;
spdlog::info("Stream scene ready at t={}", instance.now());
@@ -557,11 +572,6 @@ void scenes::stream::push_blit_handle(shard_accumulator * decoder, std::shared_p
}
}
bool scenes::stream::accumulator_images::alpha() const
{
return decoder->desc().channels == wivrn::to_headset::video_stream_description::channels_t::alpha;
}
bool scenes::stream::accumulator_images::empty() const
{
for (const auto & frame: latest_frames)
@@ -572,7 +582,7 @@ bool scenes::stream::accumulator_images::empty() const
return true;
}
std::vector<std::shared_ptr<shard_accumulator::blit_handle>> scenes::stream::common_frame(XrTime display_time)
std::array<std::shared_ptr<shard_accumulator::blit_handle>, 3> scenes::stream::common_frame(XrTime display_time)
{
if (decoders.empty())
return {};
@@ -580,10 +590,8 @@ std::vector<std::shared_ptr<shard_accumulator::blit_handle>> scenes::stream::com
thread_local std::vector<shard_accumulator::blit_handle *> common_frames;
common_frames.clear();
const bool alpha = decoders[0].latest_frames[0] and decoders[0].latest_frames[0]->view_info.alpha;
for (size_t i = 0; i < decoders.size(); ++i)
for (size_t i = 0; i < view_count + alpha; ++i)
{
if (decoders[i].alpha() and not alpha)
continue;
if (i == 0)
{
for (const auto & h: decoders[i].latest_frames)
@@ -606,8 +614,7 @@ std::vector<std::shared_ptr<shard_accumulator::blit_handle>> scenes::stream::com
// clang-format on
}
}
std::vector<std::shared_ptr<shard_accumulator::blit_handle>> result;
result.reserve(decoders.size());
std::array<std::shared_ptr<shard_accumulator::blit_handle>, view_count + 1> result;
if (not common_frames.empty())
{
auto min = std::ranges::min_element(common_frames,
@@ -620,12 +627,10 @@ std::vector<std::shared_ptr<shard_accumulator::blit_handle>> scenes::stream::com
assert(*min);
auto frame_index = (*min)->feedback.frame_index;
for (const auto & decoder: decoders)
for (auto [i, decoder]: utils::enumerate(decoders))
{
if (alpha or not decoder.alpha())
result.emplace_back(decoder.frame(frame_index));
else
result.emplace_back(nullptr);
if (alpha or i < view_count)
result[i] = decoder.frame(frame_index);
}
}
else
@@ -644,9 +649,9 @@ std::vector<std::shared_ptr<shard_accumulator::blit_handle>> scenes::stream::com
spdlog::warn(frames);
}
for (const auto & decoder: decoders)
for (auto [i, decoder]: utils::enumerate(decoders))
{
if (alpha or not decoder.alpha())
if (alpha or i < view_count)
{
auto min = std::ranges::min_element(decoder.latest_frames,
std::ranges::less{},
@@ -655,10 +660,8 @@ std::vector<std::shared_ptr<shard_accumulator::blit_handle>> scenes::stream::com
return std::numeric_limits<XrTime>::max();
return std::abs(frame->view_info.display_time - display_time);
});
result.emplace_back(*min);
result[i] = *min;
}
else
result.emplace_back(nullptr);
}
}
return result;
@@ -738,6 +741,7 @@ bool scenes::stream::is_gui_interactable() const
{
case gui_status::stats:
case gui_status::settings:
case gui_status::bitrate_settings:
case gui_status::foveation_settings:
case gui_status::applications:
case gui_status::application_launcher:
@@ -764,19 +768,11 @@ void scenes::stream::render(const XrFrameState & frame_state)
last_display_time = frame_state.predictedDisplayTime;
std::shared_lock lock(decoder_mutex);
if (decoders.empty() or not frame_state.shouldRender)
if (not frame_state.shouldRender or (decoders[0].empty() and decoders[1].empty()))
{
// TODO: stop/restart video stream
session.begin_frame();
session.end_frame(frame_state.predictedDisplayTime, {});
std::unique_lock lock(frames_mutex);
for (auto & i: decoders)
{
for (auto & frame: i.latest_frames)
frame.reset();
}
return;
}
@@ -792,14 +788,13 @@ void scenes::stream::render(const XrFrameState & frame_state)
application::pop_scene();
}
assert(swapchain);
if (device.waitForFences(*fence, VK_TRUE, UINT64_MAX) == vk::Result::eTimeout)
throw std::runtime_error("Vulkan fence timeout");
device.resetFences(*fence);
// We don't need those after vkWaitForFences
current_blit_handles.clear();
current_blit_handles.fill(nullptr);
gpu_timestamps timestamps;
if (query_pool_filled)
@@ -839,13 +834,15 @@ void scenes::stream::render(const XrFrameState & frame_state)
// Search for frame with desired display time on all decoders
// If no such frame exists, use the latest frame for each decoder
current_blit_handles = common_frame(frame_state.predictedDisplayTime);
std::array<XrPosef, 2> pose{};
std::array<XrFovf, 2> fov{};
std::array<wivrn::to_headset::foveation_parameter, 2> foveation{};
std::array<XrPosef, view_count> pose;
std::array<XrFovf, view_count> fov;
std::array<wivrn::to_headset::foveation_parameter, view_count> foveation;
bool use_alpha = false;
for (auto & blit_handle: current_blit_handles)
std::array<stream_defoveator::input, view_count> images;
for (size_t i = 0; i < view_count + use_alpha; ++i)
{
auto & blit_handle = current_blit_handles[i];
if (not blit_handle)
continue;
@@ -855,9 +852,6 @@ void scenes::stream::render(const XrFrameState & frame_state)
++blit_handle->feedback.times_displayed;
blit_handle->feedback.displayed = frame_state.predictedDisplayTime;
pose = blit_handle->view_info.pose;
fov = blit_handle->view_info.fov;
foveation = blit_handle->view_info.foveation;
use_alpha = blit_handle->view_info.alpha;
if (blit_handle->current_layout == vk::ImageLayout::eUndefined)
@@ -878,24 +872,44 @@ void scenes::stream::render(const XrFrameState & frame_state)
command_buffer.pipelineBarrier(vk::PipelineStageFlagBits::eAllCommands, vk::PipelineStageFlagBits::eAllCommands, {}, {}, {}, barrier);
blit_handle->current_layout = vk::ImageLayout::eGeneral;
}
}
// Blit images from the decoders
std::array<blitter::output, view_count> blitted;
for (auto [i, b]: utils::enumerate(blitters))
{
b.begin(command_buffer);
for (auto [j, blit_handle]: utils::enumerate(current_blit_handles))
if (i < view_count)
{
if (not blit_handle)
continue;
b.push_image(command_buffer, j, decoders[j].decoder->sampler(), decoders[j].decoder->extent(), blit_handle->image_view, blit_handle->current_layout);
foveation[i] = blit_handle->view_info.foveation[i];
pose[i] = blit_handle->view_info.pose[i];
fov[i] = blit_handle->view_info.fov[i];
// colour image
images[i] = {
.rgb = blit_handle->image_view,
.sampler_rgb = decoders[i].decoder->sampler(),
.rect_rgb = {
.extent = blit_handle->extent,
},
.layout_rgb = blit_handle->current_layout,
};
}
else
{
// alpha image, must set for each view
for (int j = 0; j < view_count; ++j)
{
images[j].a = blit_handle->image_view;
images[j].sampler_a = decoders[i].decoder->sampler();
images[j].rect_a = vk::Rect2D{
// in full size pixels
.offset = {
.x = j * video_stream_description->width,
},
.extent = {
.width = blit_handle->extent.width * 2,
.height = blit_handle->extent.height * 2,
},
};
images[j].layout_a = blit_handle->current_layout;
}
}
blitted[i] = b.end(command_buffer);
}
command_buffer.writeTimestamp(vk::PipelineStageFlagBits::eBottomOfPipe, *query_pool, 1);
XrExtent2Di extents[view_count];
{
int32_t max_width = 0;
@@ -906,9 +920,11 @@ void scenes::stream::render(const XrFrameState & frame_state)
max_width = std::max(max_width, extents[i].width);
max_height = std::max(max_height, extents[i].height);
}
// If the defoveated image is larger than the swapchain, try to reallocate one
if (swapchain.width() < max_width or swapchain.height() < max_height)
if (not swapchain)
setup_reprojection_swapchain(max_width, max_height);
else if (swapchain.width() < max_width or swapchain.height() < max_height)
{
// If the defoveated image is larger than the swapchain, try to reallocate one
try
{
spdlog::info("Recreating swapchain, from {}x{} to {}x{}",
@@ -929,12 +945,13 @@ void scenes::stream::render(const XrFrameState & frame_state)
}
}
}
assert(swapchain);
// defoveate the image
int image_index = swapchain.acquire();
swapchain.wait();
defoveator->defoveate(command_buffer, foveation, blitted, image_index);
defoveator->defoveate(command_buffer, foveation, images, image_index);
command_buffer.writeTimestamp(vk::PipelineStageFlagBits::eBottomOfPipe, *query_pool, 2);
command_buffer.writeTimestamp(vk::PipelineStageFlagBits::eBottomOfPipe, *query_pool, 1);
command_buffer.end();
vk::SubmitInfo submit_info;
@@ -1005,6 +1022,7 @@ void scenes::stream::render(const XrFrameState & frame_state)
switch (gui_status)
{
case gui_status::hidden:
case gui_status::bitrate_settings:
case gui_status::foveation_settings:
case gui_status::compact:
case gui_status::overlay_only:
@@ -1104,6 +1122,7 @@ void scenes::stream::render(const XrFrameState & frame_state)
case gui_status::stats:
case gui_status::settings:
case gui_status::bitrate_settings:
case gui_status::foveation_settings:
case gui_status::applications:
case gui_status::application_launcher:
@@ -1125,37 +1144,25 @@ void scenes::stream::setup(const to_headset::video_stream_description & descript
{
session.set_refresh_rate(description.fps);
spdlog::info("Creating decoders, size {}x{}", description.width, description.height);
std::unique_lock lock(decoder_mutex);
decoders.clear();
if (description.items.empty())
{
spdlog::info("Stopping video stream");
return;
}
video_stream_description = description;
for (auto & b: blitters)
b.reset(description);
for (const auto & [stream_index, item]: utils::enumerate(description.items))
for (const auto & [stream_index, item]: utils::enumerate(decoders))
{
spdlog::info("Creating decoder size {}x{} offset {},{}", item.width, item.height, item.offset_x, item.offset_y);
decoders.push_back(accumulator_images{
.decoder = std::make_unique<shard_accumulator>(device, physical_device, instance, queue_family_index, item, description.fps, shared_from_this(), stream_index),
});
item = accumulator_images{
.decoder = std::make_unique<shard_accumulator>(device, physical_device, instance, queue_family_index, description, shared_from_this(), stream_index),
};
}
}
void scenes::stream::setup_reprojection_swapchain(uint32_t swapchain_width, uint32_t swapchain_height)
{
assert(swapchain_width);
assert(swapchain_height);
device.waitIdle();
session.set_refresh_rate(video_stream_description->fps);
const uint32_t video_width = video_stream_description->width / view_count;
const uint32_t video_height = video_stream_description->height;
auto views = system.view_configuration_views(viewconfig);
swapchain = xr::swapchain(instance, session, device, swapchain_format, swapchain_width, swapchain_height, 1, views.size());
@@ -1202,7 +1209,7 @@ scene::meta & scenes::stream::get_meta_scene()
{"recenter_left", XR_ACTION_TYPE_BOOLEAN_INPUT},
{"recenter_right", XR_ACTION_TYPE_BOOLEAN_INPUT},
{"foveation_pitch", XR_ACTION_TYPE_FLOAT_INPUT},
{"settings_adjust", XR_ACTION_TYPE_FLOAT_INPUT},
{"foveation_distance", XR_ACTION_TYPE_FLOAT_INPUT},
{"foveation_ok", XR_ACTION_TYPE_BOOLEAN_INPUT},
{"foveation_cancel", XR_ACTION_TYPE_BOOLEAN_INPUT},
@@ -1234,7 +1241,7 @@ scene::meta & scenes::stream::get_meta_scene()
{"recenter_left", "/user/hand/left/input/squeeze/value"},
{"recenter_right", "/user/hand/right/input/squeeze/value"},
{"foveation_pitch", "/user/hand/right/input/thumbstick/y"},
{"settings_adjust", "/user/hand/right/input/thumbstick/y"},
{"foveation_distance", "/user/hand/left/input/thumbstick/y"},
{"foveation_ok", "/user/hand/right/input/a/click"},
{"foveation_cancel", "/user/hand/right/input/b/click"},
+8 -14
View File
@@ -24,7 +24,6 @@
#include "decoder/shard_accumulator.h"
#include "render/imgui_impl.h"
#include "scene.h"
#include "scenes/blitter.h"
#include "scenes/input_profile.h"
#include "stream_defoveator.h"
#include "utils/thread_safe.h"
@@ -55,8 +54,6 @@ public:
private:
static const size_t view_count = 2;
using stream_description = wivrn::to_headset::video_stream_description::item;
struct accumulator_images
{
std::unique_ptr<wivrn::shard_accumulator> decoder;
@@ -64,7 +61,6 @@ private:
std::array<std::shared_ptr<wivrn::shard_accumulator::blit_handle>, image_buffer_size> latest_frames;
std::shared_ptr<wivrn::shard_accumulator::blit_handle> frame(uint64_t id) const;
bool alpha() const;
bool empty() const;
};
@@ -72,7 +68,7 @@ private:
// for frames inside accumulator images
std::mutex frames_mutex;
std::vector<std::shared_ptr<wivrn::shard_accumulator::blit_handle>> common_frame(XrTime display_time);
std::array<std::shared_ptr<wivrn::shard_accumulator::blit_handle>, view_count + 1> common_frame(XrTime display_time);
std::unique_ptr<wivrn_session> network_session;
std::atomic<bool> exiting = false;
@@ -90,9 +86,7 @@ private:
std::shared_mutex decoder_mutex;
std::optional<to_headset::video_stream_description> video_stream_description;
std::vector<accumulator_images> decoders; // Locked by decoder_mutex
std::array<blitter, view_count> blitters;
std::array<accumulator_images, view_count + 1> decoders; // Locked by decoder_mutex
std::optional<stream_defoveator> defoveator;
@@ -132,6 +126,7 @@ private:
compact,
stats,
settings,
bitrate_settings,
foveation_settings,
applications,
application_launcher,
@@ -149,7 +144,7 @@ private:
XrAction plots_toggle_2 = XR_NULL_HANDLE;
XrAction recenter_left = XR_NULL_HANDLE;
XrAction recenter_right = XR_NULL_HANDLE;
XrAction foveation_pitch = XR_NULL_HANDLE;
XrAction settings_adjust = XR_NULL_HANDLE;
XrAction foveation_distance = XR_NULL_HANDLE;
XrAction foveation_ok = XR_NULL_HANDLE;
XrAction foveation_cancel = XR_NULL_HANDLE;
@@ -167,7 +162,7 @@ private:
void update_gui_position(xr::spaces controller);
// Keep a reference to the resources needed to blit the images until vkWaitForFences
std::vector<std::shared_ptr<wivrn::shard_accumulator::blit_handle>> current_blit_handles;
std::array<std::shared_ptr<wivrn::shard_accumulator::blit_handle>, view_count + 1> current_blit_handles;
XrTime running_application_req = 0;
thread_safe<to_headset::running_applications> running_applications;
@@ -253,13 +248,11 @@ private:
struct gpu_timestamps
{
float gpu_barrier = 0;
float gpu_time = 0;
};
struct global_metric //: gpu_timestamps
struct global_metric
{
float gpu_barrier;
float gpu_time;
float cpu_time = 0;
float bandwidth_rx = 0;
@@ -308,10 +301,11 @@ private:
float compact_cpu_time = 0;
float compact_gpu_time = 0;
void accumulate_metrics(XrTime predicted_display_time, const std::vector<std::shared_ptr<wivrn::shard_accumulator::blit_handle>> & blit_handles, const gpu_timestamps & timestamps);
void accumulate_metrics(XrTime predicted_display_time, const std::array<std::shared_ptr<wivrn::shard_accumulator::blit_handle>, view_count + 1> & blit_handles, const gpu_timestamps & timestamps);
void gui_performance_metrics();
void gui_compact_view();
void gui_settings(float predicted_display_period);
void gui_bitrate_settings(float predicted_display_period);
void gui_foveation_settings(float predicted_display_period);
void gui_applications();
void draw_gui(XrTime predicted_display_time, XrDuration predicted_display_period);
+1 -1
View File
@@ -295,7 +295,7 @@ static size_t required_vertices(const wivrn::to_headset::foveation_parameter & p
void stream_defoveator::defoveate(vk::raii::CommandBuffer & command_buffer,
const std::array<wivrn::to_headset::foveation_parameter, 2> & foveation,
std::span<wivrn::blitter::output> inputs,
const std::array<input, 2> & inputs,
int destination)
{
if (destination < 0 || destination >= (int)output_images.size())
+13 -2
View File
@@ -19,7 +19,6 @@
#pragma once
#include "blitter.h"
#include "vk/allocation.h"
#include "wivrn_packets.h"
#include <vulkan/vulkan_raii.hpp>
@@ -61,6 +60,18 @@ class stream_defoveator
pipeline_t & ensure_pipeline(size_t view, vk::Sampler rgb, vk::Sampler a);
public:
struct input
{
vk::ImageView rgb;
vk::Sampler sampler_rgb;
vk::Rect2D rect_rgb;
vk::ImageLayout layout_rgb;
vk::ImageView a;
vk::Sampler sampler_a;
vk::Rect2D rect_a;
vk::ImageLayout layout_a;
};
stream_defoveator(
vk::raii::Device & device,
vk::raii::PhysicalDevice & physical_device,
@@ -73,7 +84,7 @@ public:
void defoveate(
vk::raii::CommandBuffer & command_buffer,
const std::array<wivrn::to_headset::foveation_parameter, 2> & foveation,
std::span<wivrn::blitter::output> inputs,
const std::array<input, 2> & inputs,
int destination);
XrExtent2Di defoveated_size(const wivrn::to_headset::foveation_parameter &) const;
+54 -6
View File
@@ -86,7 +86,7 @@ ImPlotPoint getter(int index, void * data_)
}
} // namespace
void scenes::stream::accumulate_metrics(XrTime predicted_display_time, const std::vector<std::shared_ptr<shard_accumulator::blit_handle>> & blit_handles, const gpu_timestamps & timestamps)
void scenes::stream::accumulate_metrics(XrTime predicted_display_time, const std::array<std::shared_ptr<shard_accumulator::blit_handle>, view_count + 1> & blit_handles, const gpu_timestamps & timestamps)
{
uint64_t rx = network_session->bytes_received();
uint64_t tx = network_session->bytes_sent();
@@ -167,12 +167,11 @@ void scenes::stream::gui_performance_metrics()
ImVec2 window_size = ImGui::GetWindowSize() - ImVec2(2, 2) * style.WindowPadding;
static const std::array plots = {
const std::array plots = {
// clang-format off
plot(_("CPU time"), {{"", &global_metric::cpu_time}}, "s"),
plot(_("GPU time"), {{_("Reproject"), &global_metric::gpu_time},
{_("Blit"), &global_metric::gpu_barrier}}, "s"),
plot(_("GPU time"), {{_("Defoveate"), &global_metric::gpu_time}}, "s"),
plot(_("Network"), {{_("Download"), &global_metric::bandwidth_rx},
{_("Upload"), &global_metric::bandwidth_tx}}, "bit/s"),
@@ -386,7 +385,9 @@ void scenes::stream::gui_compact_view()
static void send_settings_changed_packet(xr::session & session, wivrn_session * network, const configuration & config, float predicted_display_period)
{
const auto & refresh_rates = session.get_refresh_rates();
from_headset::settings_changed packet{};
from_headset::settings_changed packet{
.bitrate_bps = config.bitrate_bps,
};
if (config.preferred_refresh_rate and (config.preferred_refresh_rate == 0 or utils::contains(refresh_rates, *config.preferred_refresh_rate)))
{
packet.preferred_refresh_rate = *config.preferred_refresh_rate;
@@ -402,6 +403,7 @@ static void send_settings_changed_packet(xr::session & session, wivrn_session *
std::string openxr_post_processing_flag_name(XrCompositionLayerSettingsFlagsFB flag); // TODO declaration in a .h file
void scenes::stream::gui_settings(float predicted_display_period)
{
const ImGuiStyle & style = ImGui::GetStyle();
auto & config = application::get_config();
ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(20, 20));
@@ -458,6 +460,20 @@ void scenes::stream::gui_settings(float predicted_display_period)
}
}
{
const auto text = _("Bitrate:");
const auto size = ImGui::CalcTextSize(text.c_str());
ImGui::Text("%s", text.c_str());
ImGui::SameLine(0.f, 10.f);
ImGui::SetCursorPosY(ImGui::GetCursorPosY() + (size.y / 4.f) - style.FramePadding.y * 3.f);
if (ImGui::Button(fmt::format("{}Mbit/s", config.bitrate_bps / 1'000'000).c_str()))
gui_status = gui_status::bitrate_settings;
imgui_ctx->vibrate_on_hover();
if (ImGui::IsItemHovered())
imgui_ctx->tooltip(_("Click to adjust bitrate"));
}
if (application::get_openxr_post_processing_supported())
{
ImGui::Text("%s", _S("OpenXR post-processing"));
@@ -571,6 +587,31 @@ void scenes::stream::gui_settings(float predicted_display_period)
ImGui::PopStyleVar();
}
void scenes::stream::gui_bitrate_settings(float predicted_display_period)
{
auto & config = application::get_config();
ImGui::PushFont(nullptr, constants::gui::font_size_large);
ImGui::Text("%s", _S("Use the right thumbstick to adjust the bitrate"));
ImGui::Text("%s", _S("Press A to go back"));
ImGui::Text("%s", fmt::format(_F("Bitrate: {}Mbit/s"), config.bitrate_bps / 1'000'000).c_str());
ImGui::PopFont();
// Maximum speed of 20Mbit/s
float delta = application::read_action_float(settings_adjust).value_or(std::pair{0, 0}).second * 20'000'000.f * predicted_display_period;
config.bitrate_bps = std::clamp(config.bitrate_bps + static_cast<int32_t>(delta), 1'000'000u, config.max_bitrate());
bool ok = application::read_action_bool(foveation_ok).value_or(std::pair{0, false}).second;
if (ok)
{
config.save();
gui_status = gui_status::settings;
}
send_settings_changed_packet(session, network_session.get(), application::get_config(), predicted_display_period);
}
void scenes::stream::gui_foveation_settings(float predicted_display_period)
{
ImGui::PushFont(nullptr, constants::gui::font_size_large);
@@ -581,7 +622,7 @@ void scenes::stream::gui_foveation_settings(float predicted_display_period)
ImGui::PopFont();
// Maximum speed 1 rad/s
float delta_pitch = application::read_action_float(foveation_pitch).value_or(std::pair{0, 0}).second * predicted_display_period;
float delta_pitch = application::read_action_float(settings_adjust).value_or(std::pair{0, 0}).second * predicted_display_period;
// Maximum speed 2m/s @ 1m
float delta_distance = std::exp(std::log(2) * application::read_action_float(foveation_distance).value_or(std::pair{0, 0}).second * predicted_display_period);
@@ -726,6 +767,7 @@ void scenes::stream::draw_gui(XrTime predicted_display_time, XrDuration predicte
switch (gui_status)
{
case gui_status::hidden:
case gui_status::bitrate_settings:
case gui_status::foveation_settings:
case gui_status::overlay_only:
case gui_status::compact:
@@ -788,6 +830,7 @@ void scenes::stream::draw_gui(XrTime predicted_display_time, XrDuration predicte
glm::mat3 M = glm::mat3_cast(head_position->second);
switch (gui_status)
{
case gui_status::bitrate_settings:
case gui_status::foveation_settings:
imgui_ctx->layers()[0].orientation = head_position->second;
imgui_ctx->layers()[0].position = head_position->first + M * glm::vec3{0, -override_foveation_distance * sin(override_foveation_pitch), -override_foveation_distance};
@@ -831,6 +874,7 @@ void scenes::stream::draw_gui(XrTime predicted_display_time, XrDuration predicte
break;
case gui_status::hidden:
case gui_status::bitrate_settings:
case gui_status::foveation_settings:
ImGui::SetNextWindowPos(ImGui::GetMainViewport()->Size / 2, ImGuiCond_Always, ImVec2(0.5f, 0.5f));
always_auto_resize = true;
@@ -905,6 +949,10 @@ void scenes::stream::draw_gui(XrTime predicted_display_time, XrDuration predicte
ImGui::EndChild();
break;
case gui_status::bitrate_settings:
gui_bitrate_settings(predicted_display_period * 1.e-9f);
break;
case gui_status::foveation_settings:
gui_foveation_settings(predicted_display_period * 1.e-9f);
break;
+22 -1
View File
@@ -671,9 +671,13 @@ static device_id derived_from(device_id target)
{
case device_id::LEFT_AIM:
case device_id::LEFT_PALM:
case device_id::LEFT_PINCH_POSE:
case device_id::LEFT_POKE:
return device_id::LEFT_GRIP;
case device_id::RIGHT_AIM:
case device_id::RIGHT_PALM:
case device_id::RIGHT_PINCH_POSE:
case device_id::RIGHT_POKE:
return device_id::RIGHT_GRIP;
default:
assert(false);
@@ -725,6 +729,19 @@ void scenes::stream::on_interaction_profile_changed(const XrEventDataInteraction
DO_PROFILE(meta, touch_controller_quest_2)
DO_PROFILE(samsung, odyssey_controller)
DO_PROFILE(valve, index_controller)
// FIXME: remove once support for pre-1.1 profiles is dropped
if (profile == "/interaction_profiles/facebook/touch_controller_pro")
{
interaction_profiles[i] = interaction_profile::meta_touch_pro_controller;
continue;
}
if (profile == "/interaction_profiles/meta/touch_controller_plus")
{
interaction_profiles[i] = interaction_profile::meta_touch_plus_controller;
continue;
}
spdlog::warn("unknown interaction profile {}", profile);
}
catch (std::exception & e)
{
@@ -737,12 +754,16 @@ void scenes::stream::on_interaction_profile_changed(const XrEventDataInteraction
for (device_id target: {
device_id::LEFT_AIM,
device_id::LEFT_PALM,
device_id::LEFT_PINCH_POSE,
device_id::LEFT_POKE,
device_id::RIGHT_AIM,
device_id::RIGHT_PALM,
device_id::RIGHT_PINCH_POSE,
device_id::RIGHT_POKE,
})
{
// don't do derived poses for hand interaction
const bool right = target >= device_id::RIGHT_GRIP && target <= device_id::RIGHT_PALM;
const bool right = (target >= device_id::RIGHT_GRIP && target <= device_id::RIGHT_PALM) || target == device_id::RIGHT_PINCH_POSE || target == device_id::RIGHT_POKE;
if (interaction_profiles[right].load() == interaction_profile::ext_hand_interaction_ext)
{
network_session->send_control(from_headset::derived_pose{
+2 -1
View File
@@ -5,7 +5,7 @@ const int nb_clipping = 4;
const int nb_texcoords = 2;
const bool use_pbr = false;
const bool use_normal_maps = false;
const bool use_normal_maps = true;
layout(set = 0, binding = 0) uniform scene_ubo
{
@@ -136,3 +136,4 @@ layout(location = 5) VS_TO_FS vec2 texcoord_metallic_roughness;
layout(location = 6) VS_TO_FS vec2 texcoord_occlusion;
layout(location = 7) VS_TO_FS vec2 texcoord_emissive;
layout(location = 8) VS_TO_FS vec2 texcoord_normal;
layout(location = 9) VS_TO_FS vec4 vertex_color;
+3 -3
View File
@@ -30,7 +30,7 @@ layout(early_fragment_tests) in;
void main()
{
vec4 albedo = material.base_color_factor * texture(base_color_texture, texcoord_base_color);
vec4 albedo = vertex_color * material.base_color_factor * texture(base_color_texture, texcoord_base_color);
vec3 emissive_color = (material.base_emissive_factor * texture(emissive_texture, texcoord_emissive)).rgb;
vec3 normal_unit;
@@ -41,10 +41,10 @@ void main()
// glTF spec §3.7.2.1
vec3 bitangent = cross(normal, tangent.xyz) * tangent.w;
mat3 TBN = mat3(tangent.xyz, bitangent, normal); // View space to tangent space?
mat3 TBN = mat3(tangent.xyz, bitangent, normal);
// Normal in view space
normal_unit = TBN * sampled_normal;
normal_unit = normalize(TBN * sampled_normal);
}
else
normal_unit = normalize(normal);
+1
View File
@@ -58,6 +58,7 @@ void main()
frag_pos = mesh.modelview[gl_ViewIndex] * vec4(in_position, 1.0);
light_pos = scene.view[gl_ViewIndex] * scene.light_position;
vertex_color = in_color;
for (int i = 0; i < nb_clipping; i++)
{
+5 -5
View File
@@ -30,7 +30,7 @@ layout(location = 0) out vec4 out_color;
void main()
{
vec4 albedo = material.base_color_factor * texture(base_color_texture, texcoord_base_color);
vec4 albedo = vertex_color * material.base_color_factor * texture(base_color_texture, texcoord_base_color);
vec3 emissive_color = (material.base_emissive_factor * texture(emissive_texture, texcoord_emissive)).rgb;
vec3 normal_unit;
@@ -41,10 +41,10 @@ void main()
// glTF spec §3.7.2.1
vec3 bitangent = cross(normal, tangent.xyz) * tangent.w;
mat3 TBN = mat3(tangent.xyz, bitangent, normal); // View space to tangent space?
mat3 TBN = mat3(tangent.xyz, bitangent, normal);
// Normal in view space
normal_unit = TBN * sampled_normal;
normal_unit = normalize(TBN * sampled_normal);
}
else
normal_unit = normalize(normal);
@@ -65,8 +65,8 @@ void main()
vec3 light_colour = scene.light_color.rgb;
float attenuation = 1;
vec3 radiance =
per_light_radiance(albedo.rgb, metallic, roughness, light_colour, light_dir, normal_unit, view_dir, half_vec, attenuation) +
vec3(scene.ambient_color) * albedo.rgb * ao;
per_light_radiance(albedo.rgb, metallic, roughness, light_colour, light_dir, normal_unit, view_dir, half_vec, attenuation) +
vec3(scene.ambient_color) * albedo.rgb * ao;
vec3 tmp = radiance + emissive_color;
+1
View File
@@ -67,6 +67,7 @@ void main()
frag_pos = mesh.modelview[gl_ViewIndex] * vec4(in_position, 1.0);
light_pos = scene.view[gl_ViewIndex] * scene.light_position;
vertex_color = in_color;
for(int i = 0; i < nb_clipping; i++)
{
-63
View File
@@ -1,63 +0,0 @@
/*
* WiVRn VR streaming
* Copyright (C) 2022 Guillaume Meunier <guillaume.meunier@centraliens.net>
* Copyright (C) 2022 Patrick Nicolas <patricknicolas@laposte.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#version 450
#ifdef VERT_SHADER
layout(constant_id = 0) const float useful_size_x = 1.0;
layout(constant_id = 1) const float useful_size_y = 1.0;
vec2 positions[3] = vec2[](
vec2(-1.0, -1.0),
vec2(3.0, -1.0),
vec2(-1.0, 3.0));
vec2 uvs[3] = vec2[](
vec2(0.0, 0.0),
vec2(2.0 * useful_size_x, 0.0),
vec2(0.0, 2.0 * useful_size_y));
layout(location = 0) out vec2 outUV;
void main()
{
outUV = uvs[gl_VertexIndex];
gl_Position = vec4(positions[gl_VertexIndex], 0.0, 1.0);
}
#endif
#ifdef FRAG_SHADER
layout(binding = 0) uniform sampler2D texSampler;
layout(constant_id = 0) const bool is_alpha = false;
layout(location = 0) in vec2 inUV;
layout(location = 0) out vec4 outColor;
void main()
{
outColor = texture(texSampler, inUV);
outColor.a = outColor.r;
if (!is_alpha)
{
outColor.a = 1;
}
}
#endif
+1 -1
View File
@@ -217,7 +217,7 @@ future<Result, Progress> async(F && f, Args &&... args)
fut.shared_state = std::make_shared<typename future<Result, Progress>::state>();
fut.shared_state->thread = std::thread(
[f](async_token<Result, Progress> token, Args &&... args) {
[f = std::move(f)](async_token<Result, Progress> token, Args &&... args) {
try
{
token.set_result(std::invoke(f, token, std::forward<Args>(args)...));
+2 -1
View File
@@ -24,7 +24,8 @@
#define _(x) boost::locale::gettext(x)
#define _F(x) fmt::runtime(boost::locale::gettext(x))
#define _S(x) boost::locale::gettext(x).c_str()
#define _cS(c, x) boost::locale::pgettext(c, x).c_str()
#define _C(c, x) boost::locale::pgettext(c, x)
#define _cS(c, x) _C(c, x).c_str()
#define gettext_noop(x) x
#define gettext_noop_context(c, x) x
+1 -1
View File
@@ -19,7 +19,7 @@
#include "json_string.h"
std::string json_string(const std::string & in)
std::string json_string(const std::string_view & in)
{
std::string out;
out.reserve(in.size() + 2);
+1 -1
View File
@@ -21,4 +21,4 @@
#include <string>
std::string json_string(const std::string & in);
std::string json_string(const std::string_view & in);
+72
View File
@@ -0,0 +1,72 @@
/*
* WiVRn VR streaming
* Copyright (C) 2024 galister <galister@librevr.org>
* Copyright (C) 2025 Sapphire <imsapphire0@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#include "android_face_tracker.h"
#include "wivrn_packets.h"
#include "xr/instance.h"
#include "xr/session.h"
#include <openxr/openxr.h>
xr::android_face_tracker::android_face_tracker(instance & inst, session & s) :
handle(inst.get_proc<PFN_xrDestroyFaceTrackerANDROID>("xrDestroyFaceTrackerANDROID"))
{
auto xrCreateFaceTrackerANDROID = inst.get_proc<PFN_xrCreateFaceTrackerANDROID>("xrCreateFaceTrackerANDROID");
xrGetFaceCalibrationStateANDROID = inst.get_proc<PFN_xrGetFaceCalibrationStateANDROID>("xrGetFaceCalibrationStateANDROID");
xrGetFaceStateANDROID = inst.get_proc<PFN_xrGetFaceStateANDROID>("xrGetFaceStateANDROID");
assert(xrCreateFaceTrackerANDROID);
XrFaceTrackerCreateInfoANDROID create_info{
.type = XR_TYPE_FACE_TRACKER_CREATE_INFO_ANDROID,
.next = nullptr,
};
CHECK_XR(xrCreateFaceTrackerANDROID(s, &create_info, &id));
}
void xr::android_face_tracker::get_weights(XrTime time, wivrn::from_headset::tracking::android_face & out_expressions)
{
if (!id || !xrGetFaceStateANDROID)
return;
XrBool32 is_calibrated;
if (XR_SUCCEEDED(xrGetFaceCalibrationStateANDROID(id, &is_calibrated)))
out_expressions.is_calibrated = is_calibrated;
else
out_expressions.is_calibrated = false;
XrFaceStateGetInfoANDROID info{
.type = XR_TYPE_FACE_STATE_GET_INFO_ANDROID,
.next = nullptr,
.time = time,
};
XrFaceStateANDROID state{
.type = XR_TYPE_FACE_STATE_ANDROID,
.next = nullptr,
.parametersCapacityInput = (uint32_t)out_expressions.parameters.size(),
.parameters = out_expressions.parameters.data(),
.regionConfidencesCapacityInput = (uint32_t)out_expressions.confidences.size(),
.regionConfidences = out_expressions.confidences.data(),
};
CHECK_XR(xrGetFaceStateANDROID(id, &info, &state));
out_expressions.state = state.faceTrackingState;
out_expressions.sample_time = state.sampleTime;
out_expressions.is_valid = state.isValid;
}
+42
View File
@@ -0,0 +1,42 @@
/*
* WiVRn VR streaming
* Copyright (C) 2024 galister <galister@librevr.org>
* Copyright (C) 2025 Sapphire <imsapphire0@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once
#include "utils/handle.h"
#include "wivrn_packets.h"
#include <openxr/openxr.h>
namespace xr
{
class instance;
class session;
class android_face_tracker : public utils::handle<XrFaceTrackerANDROID>
{
PFN_xrGetFaceCalibrationStateANDROID xrGetFaceCalibrationStateANDROID{};
PFN_xrGetFaceStateANDROID xrGetFaceStateANDROID{};
public:
using packet_type = wivrn::from_headset::tracking::android_face;
android_face_tracker(instance & inst, session & s);
void get_weights(XrTime, packet_type & out_expressions);
};
} // namespace xr
+14
View File
@@ -24,6 +24,13 @@
xr::face_tracker_type xr::face_tracker_supported(xr::instance & instance, xr::system & system)
{
if (instance.has_extension(XR_ANDROID_FACE_TRACKING_EXTENSION_NAME))
{
auto properties = system.android_face_tracking_properties();
if (properties.supportsFaceTracking)
return xr::face_tracker_type::android;
}
if (instance.has_extension(XR_FB_FACE_TRACKING2_EXTENSION_NAME))
{
auto properties = system.fb_face_tracking2_properties();
@@ -57,6 +64,13 @@ xr::face_tracker_type xr::face_tracker_supported(xr::instance & instance, xr::sy
xr::face_tracker xr::make_face_tracker(xr::instance & instance, xr::system & system, xr::session & session)
{
if (instance.has_extension(XR_ANDROID_FACE_TRACKING_EXTENSION_NAME))
{
auto properties = system.android_face_tracking_properties();
if (properties.supportsFaceTracking)
return xr::face_tracker(std::in_place_type_t<xr::android_face_tracker>(), instance, session);
}
if (instance.has_extension(XR_FB_FACE_TRACKING2_EXTENSION_NAME))
{
auto properties = system.fb_face_tracking2_properties();
+2 -1
View File
@@ -18,6 +18,7 @@
#pragma once
#include "android_face_tracker.h"
#include "fb_face_tracker2.h"
#include "htc_face_tracker.h"
#include "pico_face_tracker.h"
@@ -31,7 +32,7 @@ namespace xr
class instance;
class session;
using face_tracker = std::variant<std::monostate, xr::fb_face_tracker2, xr::htc_face_tracker, xr::pico_face_tracker>;
using face_tracker = std::variant<std::monostate, xr::android_face_tracker, xr::fb_face_tracker2, xr::htc_face_tracker, xr::pico_face_tracker>;
face_tracker make_face_tracker(xr::instance &, xr::system &, xr::session &);
+2
View File
@@ -68,10 +68,12 @@ void xr::fb_face_tracker2::get_weights(XrTime time, wivrn::from_headset::trackin
{
out_expressions.is_valid = expression_weights.isValid;
out_expressions.is_eye_following_blendshapes_valid = expression_weights.isEyeFollowingBlendshapesValid;
out_expressions.time = expression_weights.time;
}
else
{
out_expressions.is_valid = false;
out_expressions.is_eye_following_blendshapes_valid = false;
out_expressions.time = 0;
}
}
+2
View File
@@ -67,6 +67,7 @@ void xr::htc_face_tracker::get_weights(XrTime time, packet_type & out_expression
expressions.expressionCount = out_expressions.eye.size();
expressions.expressionWeightings = out_expressions.eye.data();
CHECK_XR(xrGetFacialExpressionsHTC(eye, &expressions));
out_expressions.eye_sample_time = expressions.sampleTime;
out_expressions.eye_active = expressions.isActive;
}
if (lip)
@@ -74,6 +75,7 @@ void xr::htc_face_tracker::get_weights(XrTime time, packet_type & out_expression
expressions.expressionCount = out_expressions.lip.size();
expressions.expressionWeightings = out_expressions.lip.data();
CHECK_XR(xrGetFacialExpressionsHTC(lip, &expressions));
out_expressions.lip_sample_time = expressions.sampleTime;
out_expressions.lip_active = expressions.isActive;
}
}
+7 -1
View File
@@ -144,8 +144,14 @@ void xr::session::begin_frame()
void xr::session::end_frame(XrTime display_time, const std::vector<XrCompositionLayerBaseHeader *> & layers, XrEnvironmentBlendMode blend_mode)
{
XrFrameEndInfo end_info{
const XrLocalDimmingFrameEndInfoMETA local_dimming_info{
.type = XR_TYPE_LOCAL_DIMMING_FRAME_END_INFO_META,
.localDimmingMode = XR_LOCAL_DIMMING_MODE_ON_META,
};
const XrFrameEndInfo end_info{
.type = XR_TYPE_FRAME_END_INFO,
.next = inst->has_extension(XR_META_LOCAL_DIMMING_EXTENSION_NAME) ? &local_dimming_info : nullptr,
.displayTime = display_time,
.environmentBlendMode = blend_mode,
.layerCount = (uint32_t)layers.size(),
+18
View File
@@ -131,6 +131,24 @@ XrSystemUserPresencePropertiesEXT xr::system::user_presence_properties() const
return presence_prop;
}
XrSystemFaceTrackingPropertiesANDROID xr::system::android_face_tracking_properties() const
{
if (!id)
throw std::invalid_argument("this");
XrSystemFaceTrackingPropertiesANDROID face_tracking_prop{
.type = XR_TYPE_SYSTEM_FACE_TRACKING_PROPERTIES_ANDROID,
};
XrSystemProperties prop{
.type = XR_TYPE_SYSTEM_PROPERTIES,
.next = &face_tracking_prop,
};
CHECK_XR(xrGetSystemProperties(*inst, id, &prop));
return face_tracking_prop;
}
XrSystemFaceTrackingProperties2FB xr::system::fb_face_tracking2_properties() const
{
if (!id)
+2
View File
@@ -50,6 +50,7 @@ enum class body_tracker_type
enum class face_tracker_type
{
none,
android,
fb,
htc,
pico,
@@ -83,6 +84,7 @@ public:
XrSystemHandTrackingPropertiesEXT hand_tracking_properties() const;
XrSystemEyeGazeInteractionPropertiesEXT eye_gaze_interaction_properties() const;
XrSystemUserPresencePropertiesEXT user_presence_properties() const;
XrSystemFaceTrackingPropertiesANDROID android_face_tracking_properties() const;
XrSystemFaceTrackingProperties2FB fb_face_tracking2_properties() const;
XrSystemFacialTrackingPropertiesHTC htc_face_tracking_properties() const;
XrSystemBodyTrackingPropertiesFB fb_body_tracking_properties() const;
+20 -4
View File
@@ -127,13 +127,29 @@ function(wivrn_copy_file)
endif()
endfunction()
function(wivrn_webxr_download)
if(NOT EXISTS ${FETCHCONTENT_BASE_DIR}/@webxr-input-profiles-1.0.20.tgz)
if (EXISTS ${CMAKE_SOURCE_DIR}/@webxr-input-profiles-1.0.20.tgz)
file(CREATE_LINK ${CMAKE_SOURCE_DIR}/@webxr-input-profiles-1.0.20.tgz ${FETCHCONTENT_BASE_DIR}/@webxr-input-profiles-1.0.20.tgz SYMBOLIC)
else()
file(DOWNLOAD https://registry.npmjs.com/@webxr-input-profiles/assets/-/assets-1.0.20.tgz
${FETCHCONTENT_BASE_DIR}/@webxr-input-profiles-1.0.20.tgz
EXPECTED_HASH SHA256=30df2a2268220fc0d0e034bed1550aabdd7a2500573c5216f64fc70d59c3d91e)
endif()
endif()
file(ARCHIVE_EXTRACT INPUT ${FETCHCONTENT_BASE_DIR}/@webxr-input-profiles-1.0.20.tgz DESTINATION ${FETCHCONTENT_BASE_DIR}/@webxr-input-profiles)
endfunction()
function(wivrn_webxr_controller)
set(options)
set(oneValueArgs SOURCE DESTINATION TARGET)
set(oneValueArgs PROFILE DESTINATION TARGET)
set(multiValueArgs)
cmake_parse_arguments(PARSE_ARGV 0 arg "${options}" "${oneValueArgs}" "${multiValueArgs}")
set(arg_SOURCE ${FETCHCONTENT_BASE_DIR}/@webxr-input-profiles/package/dist/profiles/${arg_PROFILE})
file(READ ${arg_SOURCE}/profile.json PROFILE_JSON)
string(JSON NB_LAYOUTS LENGTH "${PROFILE_JSON}" layouts)
@@ -149,11 +165,11 @@ function(wivrn_webxr_controller)
set(TEMPFILE ${PROFILE_ID}-${LAYOUT_NAME}.glb)
wivrn_gltf_transform_resize(SOURCE ${arg_SOURCE}/${ASSET_PATH} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/${TEMPFILE} WIDTH 512 HEIGHT 512)
wivrn_gltf_transform_uastc(SOURCE ${CMAKE_CURRENT_BINARY_DIR}/${TEMPFILE} DESTINATION ${arg_DESTINATION}/${ASSET_PATH} ZSTD 20 TARGET ${arg_TARGET})
wivrn_gltf_transform_uastc(SOURCE ${CMAKE_CURRENT_BINARY_DIR}/${TEMPFILE} DESTINATION ${arg_DESTINATION}/${arg_PROFILE}/${ASSET_PATH} ZSTD 20 TARGET ${arg_TARGET})
else()
wivrn_copy_file(SOURCE ${arg_SOURCE}/${ASSET_PATH} DESTINATION ${arg_DESTINATION}/${ASSET_PATH} TARGET ${arg_TARGET})
wivrn_copy_file(SOURCE ${arg_SOURCE}/${ASSET_PATH} DESTINATION ${arg_DESTINATION}/${arg_PROFILE}/${ASSET_PATH} TARGET ${arg_TARGET})
endif()
endforeach()
wivrn_copy_file(SOURCE ${arg_SOURCE}/profile.json DESTINATION ${arg_DESTINATION}/profile.json TARGET ${arg_TARGET})
wivrn_copy_file(SOURCE ${arg_SOURCE}/profile.json DESTINATION ${arg_DESTINATION}/${arg_PROFILE}/profile.json TARGET ${arg_TARGET})
endfunction()
+40 -45
View File
@@ -38,7 +38,7 @@
namespace wivrn
{
static constexpr int protocol_revision = 2;
static constexpr int protocol_revision = 0;
enum class device_id : uint8_t
{
@@ -211,18 +211,31 @@ struct visibility_mask_changed
enum face_type : uint8_t
{
none,
android,
fb2,
htc,
};
struct headset_info_packet
struct settings_changed
{
uint32_t recommended_eye_width;
uint32_t recommended_eye_height;
std::vector<float> available_refresh_rates;
float preferred_refresh_rate;
// for automatic
float minimum_refresh_rate;
uint32_t bitrate_bps;
};
struct headset_info_packet
{
uint16_t render_eye_width;
uint16_t render_eye_height;
uint16_t stream_eye_width;
uint16_t stream_eye_height;
std::vector<float> available_refresh_rates;
// runtime configurable settings
settings_changed settings;
struct audio_description
{
uint8_t num_channels;
@@ -239,6 +252,7 @@ struct headset_info_packet
face_type face_tracking;
uint32_t num_generic_trackers;
std::vector<video_codec> supported_codecs; // from preferred to least preferred
std::optional<uint8_t> bit_depth;
std::string system_name;
// Used for the application list
@@ -247,13 +261,6 @@ struct headset_info_packet
std::string variant;
};
struct settings_changed
{
float preferred_refresh_rate;
// for automatic
float minimum_refresh_rate;
};
struct handshake
{
// Sending this on TCP means connection will be TCP only
@@ -301,23 +308,36 @@ struct tracking
std::array<view, 2> views;
std::vector<pose> device_poses;
struct android_face
{
std::array<float, XR_FACE_PARAMETER_COUNT_ANDROID> parameters;
std::array<float, XR_FACE_REGION_CONFIDENCE_COUNT_ANDROID> confidences;
XrFaceTrackingStateANDROID state;
XrTime sample_time;
bool is_calibrated;
bool is_valid;
};
struct fb_face2
{
std::array<float, XR_FACE_EXPRESSION2_COUNT_FB> weights;
std::array<float, XR_FACE_CONFIDENCE2_COUNT_FB> confidences;
bool is_valid;
bool is_eye_following_blendshapes_valid;
XrTime time;
};
struct htc_face
{
XrTime eye_sample_time;
XrTime lip_sample_time;
std::array<float, XR_FACIAL_EXPRESSION_EYE_COUNT_HTC> eye;
std::array<float, XR_FACIAL_EXPRESSION_LIP_COUNT_HTC> lip;
bool eye_active;
bool lip_active;
};
std::variant<std::monostate, fb_face2, htc_face> face;
std::variant<std::monostate, android_face, fb_face2, htc_face> face;
};
struct trackings
@@ -616,52 +636,27 @@ struct audio_stream_description
struct video_stream_description
{
enum class channels_t
{
colour,
alpha,
};
struct item
{
// useful dimensions of the video stream
uint16_t width;
uint16_t height;
// dimensions of the video, may include padding at the end
uint16_t video_width;
uint16_t video_height;
uint16_t offset_x;
uint16_t offset_y;
video_codec codec;
channels_t channels;
uint8_t subsampling; // applies to width/height only, offsets are in full size pixels
std::optional<VkSamplerYcbcrRange> range;
std::optional<VkSamplerYcbcrModelConversion> color_model;
};
// dimensions of the video stream per eye
// alpha is half resolution
uint16_t width;
uint16_t height;
std::array<video_codec, 3> codec; // left, right, alpha
float fps;
uint16_t defoveated_width;
uint16_t defoveated_height;
std::vector<item> items;
};
class video_stream_data_shard
{
public:
inline static const size_t max_payload_size = 1400;
enum flags : uint8_t
{
start_of_slice = 1,
end_of_slice = 1 << 1,
end_of_frame = 1 << 2,
};
// Identifier of stream in video_stream_description
// Identifier of stream:
// 0 left
// 1 right
// 2 alpha
uint8_t stream_item_idx;
// Counter increased for each frame
uint64_t frame_idx;
// Identifier of the shard within the frame
uint16_t shard_idx;
uint8_t flags;
// Position information, must be present on first video shard
struct view_info_t
+3
View File
@@ -5,6 +5,7 @@ include(ECMQmlModule)
include(I18n)
ecm_find_qmlmodule(org.kde.kirigami REQUIRED)
ecm_find_qmlmodule(org.kde.kirigamiaddons.formcard REQUIRED)
add_executable(wivrn-dashboard
avahi.cpp
@@ -27,6 +28,7 @@ qt_add_dbus_interface(DBUS_INTERFACE_SRC ${CMAKE_CURRENT_SOURCE_DIR}/../dbus/io.
target_sources(wivrn-dashboard PRIVATE ${DBUS_INTERFACE_SRC})
set_source_files_properties(../images/wivrn.svg PROPERTIES QT_RESOURCE_ALIAS qml/wivrn.svg)
qt_add_resources(wivrn-dashboard PREFIX "/" BASE .. FILES ../images/wivrn.svg)
set_source_files_properties(qml/DashboardSettings.qml PROPERTIES
QT_QML_SINGLETON_TYPE TRUE
@@ -36,6 +38,7 @@ qt_add_qml_module(wivrn-dashboard
URI io.github.wivrn.wivrn
QML_FILES
qml/Main.qml
qml/About.qml
qml/ApkInstallPage.qml
qml/DashboardSettings.qml
qml/SettingsPage.qml
+16 -3
View File
@@ -25,6 +25,7 @@
<li>Meta Quest 1, 2, 3, 3S, pro</li>
<li>Pico Neo 4</li>
<li>HTC Vive Focus 3, XR Elite</li>
<li>Samsung Galaxy XR</li>
</ul>
<p>For desktop streaming, check out wlx-overlay-s.</p>
@@ -46,15 +47,15 @@
<screenshots>
<screenshot type="default">
<image type="source">https://wivrn.github.io/screenshots/dashboard-2-orig.png</image>
<image type="source">https://wivrn.github.io/screenshots/dashboard-2.png</image>
<caption>Dashboard</caption>
</screenshot>
<screenshot>
<image type="source">https://wivrn.github.io/screenshots/dashboard-1-orig.png</image>
<image type="source">https://wivrn.github.io/screenshots/dashboard-1.png</image>
<caption>Wizard</caption>
</screenshot>
<screenshot>
<image type="source">https://wivrn.github.io/screenshots/dashboard-3-orig.png</image>
<image type="source">https://wivrn.github.io/screenshots/dashboard-3.png</image>
<caption>Settings</caption>
</screenshot>
</screenshots>
@@ -67,6 +68,18 @@
<content_rating type="oars-1.1" />
<releases>
<release version="25.12" date="2025-12-19">
<url type="details">https://github.com/WiVRn/WiVRn/releases/tag/v25.12</url>
<description>
<ul>
<li>Samsung Galaxy XR support</li>
<li>Mouse and keyboard forwarding from headset to PC</li>
<li>Refresh rate and bitrate can be adjusted while streaming</li>
<li>Moved video settings from dashboard to headset</li>
<li>Update default encoder and codecs, will be Vulkan/H.265 on AMD or Intel, nvenc/AV1 or H.265 on NVIDIA</li>
</ul>
</description>
</release>
<release version="25.11.1" date="2025-11-10">
<url type="details">https://github.com/WiVRn/WiVRn/releases/tag/v25.11.1</url>
<description>
+23
View File
@@ -1,4 +1,5 @@
#include "version.h"
#include <KAboutData>
#include <KIconTheme>
#include <KLocalizedContext>
#include <KLocalizedString>
@@ -26,6 +27,28 @@ int main(int argc, char * argv[])
app.setApplicationDisplayName(i18n("WiVRn dashboard"));
KAboutData aboutData(
QStringLiteral("wivrn-dashboard"),
i18nc("@title", "WiVRn"),
wivrn::display_version(),
i18n("WiVRn server"),
KAboutLicense::GPL_V3,
i18n("(c) 2022-2026 WiVRn development team"));
aboutData.setHomepage("https://github.com/WiVRn/WiVRn");
aboutData.setBugAddress("https://github.com/WiVRn/WiVRn/issues");
aboutData.setProgramLogo(QIcon(":/qml/wivrn.svg"));
aboutData.addComponent(
i18n("Monado"),
i18n("OpenXR runtime"),
"",
"https://monado.dev/",
KAboutLicense::BSL_V1);
// Set aboutData as information about the app
KAboutData::setApplicationData(aboutData);
QCoro::Qml::registerTypes();
// Work around QTBUG-45105, QTBUG-46074, QTBUG-51112: flicker when resizing
+27
View File
@@ -0,0 +1,27 @@
import QtQuick
import QtQuick.Controls as Controls
import org.kde.kirigami as Kirigami
import org.kde.coreaddons as KCoreAddons
import org.kde.kirigamiaddons.formcard as FormCard
FormCard.AboutPage {
aboutData: KCoreAddons.AboutData
donateUrl: "https://opencollective.com/wivrn"
getInvolvedUrl: ""
footer: Controls.DialogButtonBox {
standardButtons: Controls.DialogButtonBox.NoButton
onAccepted: applicationWindow().pageStack.pop()
Controls.Button {
text: i18nc("go back to the home page", "Back")
icon.name: "go-previous"
Controls.DialogButtonBox.buttonRole: Controls.DialogButtonBox.AcceptRole
}
}
Shortcut {
sequences: [StandardKey.Cancel]
onActivated: {if (isCurrentPage) applicationWindow().pageStack.pop();}
}
}
+1 -1
View File
@@ -70,6 +70,6 @@ Kirigami.ScrollablePage {
Shortcut {
sequences: [StandardKey.Cancel]
onActivated: applicationWindow().pageStack.pop()
onActivated: {if (isCurrentPage) applicationWindow().pageStack.pop();}
}
}
+1 -1
View File
@@ -41,6 +41,6 @@ Kirigami.ScrollablePage {
Shortcut {
sequences: [StandardKey.Cancel]
onActivated: applicationWindow().pageStack.pop()
onActivated: {if (isCurrentPage) applicationWindow().pageStack.pop();}
}
}
+1 -1
View File
@@ -197,6 +197,6 @@ Kirigami.ScrollablePage {
Shortcut {
sequences: [StandardKey.Cancel]
onActivated: applicationWindow().pageStack.pop()
onActivated: {if (isCurrentPage) applicationWindow().pageStack.pop();}
}
}
+124 -103
View File
@@ -81,6 +81,22 @@ Kirigami.ApplicationWindow {
}
));
}
function onJsonConfigurationChanged(value) {
Settings.load(WivrnServer);
}
}
Connections {
target: Avahi
function onRunningChanged(value) {
if (value) {
if (WivrnServer.serverStatus != WivrnServer.Started) {
WivrnServer.start_server();
message_failed_to_start.visible = false;
}
}
}
}
Component.onCompleted: {
@@ -108,7 +124,7 @@ Kirigami.ApplicationWindow {
text: i18n("Avahi daemon is not installed")
type: Kirigami.MessageType.Warning
showCloseButton: true
visible: DashboardSettings.show_system_checks && !Avahi.installed
visible: DashboardSettings.show_system_checks && !Avahi.installed && !Avahi.running
}
Kirigami.InlineMessage {
@@ -241,27 +257,31 @@ Kirigami.ApplicationWindow {
}
GridLayout {
columns: 2
columns: 3
Layout.leftMargin: Kirigami.Units.largeSpacing
Layout.rightMargin: Kirigami.Units.largeSpacing
Item {}
Item {
Layout.fillWidth: true
}
columnSpacing: 0
Image {
source: Qt.resolvedUrl("wivrn.svg")
Layout.columnSpan: parent.width < implicitWidth + main_form.implicitWidth ? 3 : 1
}
GridLayout {
columns: 2
Layout.fillWidth: true
Kirigami.FormLayout {
id: main_form
Layout.alignment: Qt.AlignTop
Layout.horizontalStretchFactor: 0
Kirigami.Heading {
text: i18n("Server status")
level: 1
type: Kirigami.Heading.Type.Primary
}
Controls.Switch {
Kirigami.FormData.label: i18nc("whether the server is running, displayed in front of a checkbox", "Running")
id: switch_running
Layout.row: 0
Layout.column: 0
text: i18nc("whether the server is running, displayed in front of a checkbox", "Running")
checked: true
onCheckedChanged: {
@@ -272,105 +292,101 @@ Kirigami.ApplicationWindow {
}
}
Controls.Switch {
id: switch_pairing
Layout.row: 1
Layout.column: 0
text: i18nc("whether pairing is enabled, displayed in front of a checkbox", "Pairing")
onCheckedChanged: {
if (checked && !WivrnServer.pairingEnabled)
WivrnServer.enable_pairing();
else if (!checked && WivrnServer.pairingEnabled)
WivrnServer.disable_pairing();
RowLayout {
Kirigami.FormData.label: i18nc("whether pairing is enabled, displayed in front of a checkbox", "Pairing")
enabled: root.server_started
Controls.Switch {
id: switch_pairing
onCheckedChanged: {
if (checked && !WivrnServer.pairingEnabled)
WivrnServer.enable_pairing();
else if (!checked && WivrnServer.pairingEnabled)
WivrnServer.disable_pairing();
}
}
Controls.Label {
visible: WivrnServer.pairingEnabled
text: WivrnServer.pin
font.pointSize: Kirigami.Theme.defaultFont.pointSize * 1.1
}
}
Kirigami.Heading {
text: i18n("Headset status")
level: 1
type: Kirigami.Heading.Type.Primary
enabled: root.server_started
}
Controls.Label {
Layout.row: 1
Layout.column: 1
text: WivrnServer.pairingEnabled ? i18n("PIN: %1", WivrnServer.pin) : ""
wrapMode: Text.WordWrap
Layout.fillWidth: true
}
RowLayout {
Kirigami.FormData.label: i18nc("label for headset name/status under server running switch", "Headset")
enabled: root.server_started
Controls.Label {
text: WivrnServer.headsetConnected ? WivrnServer.systemName : i18n("Not connected")
}
Controls.Button {
Layout.row: 2
Layout.column: 0
text: i18n("Connect by USB")
onClicked: select_usb_device.connect()
enabled: root.server_started && Adb.adbInstalled && select_usb_device.connected_headset_count > 0
visible: !WivrnServer.headsetConnected
Controls.ToolTip.visible: root.server_started && hovered
Controls.ToolTip.delay: Kirigami.Units.toolTipDelay
Controls.ToolTip.text: {
if (!Adb.adbInstalled)
return i18n("ADB is not installed");
if (select_usb_device.connected_headset_count == 0)
return i18n("No headset is connected or your headset is not in developer mode");
return "";
Controls.Button {
text: i18n("Disconnect")
icon.name: "network-disconnect-symbolic"
onClicked: WivrnServer.disconnect_headset()
visible: root.server_started && WivrnServer.headsetConnected
}
}
// USB mode
Controls.Button {
Layout.row: 2
Layout.column: 0
text: i18n("Disconnect")
icon.name: "network-disconnect-symbolic"
onClicked: WivrnServer.disconnect_headset()
visible: root.server_started && WivrnServer.headsetConnected
Kirigami.FormData.label: i18nc("label for USB status or connect button", "USB")
text: i18nc("usb connect button", "Connect (wired)")
onClicked: select_usb_device.connect()
enabled: root.server_started && !WivrnServer.headsetConnected
visible: Adb.adbInstalled && select_usb_device.connected_headset_count > 0
}
Controls.Label {
Kirigami.FormData.label: i18nc("label for USB status or connect button", "USB")
visible: !Adb.adbInstalled
enabled: root.server_started
text: i18n("ADB is not installed")
}
Controls.Label {
Kirigami.FormData.label: i18nc("label for USB status or connect button", "USB")
visible: Adb.adbInstalled && select_usb_device.connected_headset_count == 0
enabled: root.server_started
text: i18n("No headset is connected or your headset is not in developer mode");
Layout.fillWidth: true
wrapMode: Text.Wrap
}
}
Kirigami.Separator {
Layout.columnSpan: 2
Layout.fillWidth: true
opacity: root.server_started
Layout.maximumHeight: root.server_started ? -1 : 0
}
Kirigami.Heading {
level: 1
wrapMode: Text.WordWrap
text: i18nc("automatically started application", "Application")
opacity: root.server_started
Layout.maximumHeight: root.server_started ? -1 : 0
}
SelectGame {
id: select_game
opacity: root.server_started
Layout.maximumHeight: root.server_started ? -1 : 0
}
Kirigami.Separator {
Layout.columnSpan: 2
Layout.fillWidth: true
opacity: root.server_started
Layout.maximumHeight: root.server_started ? -1 : 0
}
Kirigami.Heading {
level: 1
wrapMode: Text.WordWrap
text: i18n("Steam information")
opacity: steam_info.opacity
visible: steam_info.visible
Layout.maximumHeight: root.server_started ? -1 : 0
}
SteamLaunchOptions {
id: steam_info
visible: WivrnServer.steamCommand != ""
opacity: root.server_started
Layout.maximumHeight: root.server_started ? -1 : 0
}
Item {
// spacer item
Layout.fillHeight: true
Layout.fillWidth: true
Layout.horizontalStretchFactor: 1
}
}
Kirigami.Separator {
Layout.fillWidth: true
visible: steam_info.visible
}
Kirigami.Heading {
level: 1
type: Kirigami.Heading.Type.Primary
wrapMode: Text.WordWrap
text: i18n("Steam information")
visible: steam_info.visible
}
SteamLaunchOptions {
id: steam_info
visible: root.server_started && WivrnServer.steamCommand != ""
}
Item {
// spacer item
Layout.fillHeight: true
}
}
actions: [
@@ -378,14 +394,12 @@ Kirigami.ApplicationWindow {
text: i18n("Wizard")
icon.name: "tools-wizard-symbolic"
onTriggered: root.pageStack.push(Qt.createComponent("WizardPage.qml").createObject())
visible: root.pageStack.depth == 1
enabled: root.server_started
},
Kirigami.Action {
text: i18n("Install the app")
icon.name: "install-symbolic"
onTriggered: root.pageStack.push(Qt.createComponent("ApkInstallPage.qml").createObject())
visible: root.pageStack.depth == 1
enabled: root.server_started && Adb.adbInstalled
tooltip: {
if (!root.server_started)
@@ -399,24 +413,31 @@ Kirigami.ApplicationWindow {
text: i18n("Headsets")
icon.name: "item-symbolic"
onTriggered: root.pageStack.push(Qt.createComponent("HeadsetsPage.qml").createObject())
visible: root.pageStack.depth == 1
enabled: root.server_started
},
Kirigami.Action {
text: i18n("Settings")
icon.name: "settings-configure-symbolic"
onTriggered: root.pageStack.push(Qt.createComponent("SettingsPage.qml").createObject())
visible: root.pageStack.depth == 1
enabled: root.server_started
},
Kirigami.Action {
text: i18n("About")
icon.name: "help-about"
onTriggered: root.pageStack.push(Qt.createComponent("About.qml").createObject())
},
Kirigami.Action {
text: i18n("Troubleshoot")
icon.name: "help-contents-symbolic"
onTriggered: root.pageStack.push(Qt.createComponent("TroubleshootPage.qml").createObject())
enabled: root.pageStack.depth == 1
}
]
}
pageStack.onCurrentItemChanged: select_game.reload()
footer: Controls.Label {
text: i18n("Version %1", ApkInstaller.currentVersion)
horizontalAlignment: Text.AlignHCenter
opacity: 0.6
padding: Kirigami.Units.smallSpacing
}
}
}
+6 -141
View File
@@ -23,82 +23,6 @@ Kirigami.ScrollablePage {
Kirigami.FormLayout {
Controls.CheckBox {
id: manual_foveation
checked: Settings.scale != -1
Layout.row: 0
Layout.column: 0
text: i18nc("automatic foveation setup", "Manual foveation")
}
GridLayout {
columns: 5
enabled: manual_foveation.checked
Kirigami.FormData.label: i18n("Foveation strength:")
Controls.Slider {
id: scale_slider
Layout.row: 0
Layout.column: 0
Layout.columnSpan: 3
implicitWidth: 20 * Kirigami.Units.gridUnit
from: 0
to: 80
stepSize: 1
}
Controls.Label {
Layout.row: 0
Layout.column: 3
text: i18n("%1 %", scale_slider.value)
}
Kirigami.ContextualHelpButton {
Layout.row: 0
Layout.column: 4
toolTipText: i18n("A stronger foveation makes the image sharper in the center than in the periphery and makes the decoding faster. This is better for fast paced games.\n\nA weaker foveation gives a uniform sharpness in the whole image.\n\nThe recommended values are between 20% and 50% for headsets without eye tracking and between 50% and 70% for headsets with eye tracking.")
}
Controls.Label {
Layout.row: 1
Layout.column: 0
text: i18nc("weaker foveation", "Weaker")
}
Item {
Layout.row: 1
Layout.column: 1
// spacer item
Layout.fillWidth: true
}
Controls.Label {
Layout.row: 1
Layout.column: 2
text: i18nc("stronger foveation", "Stronger")
}
}
Kirigami.Separator {
Kirigami.FormData.isSection: true
}
Controls.SpinBox {
id: bitrate
Kirigami.FormData.label: i18n("Bitrate:")
from: 1
to: 200
textFromValue: (value, locale) => i18nc("bitrate", "%1 Mbit/s", value)
valueFromText: function (text, locale) {
var prefix_suffix = i18nc("bitrate", "%1 Mbit/s", "%1").split('%1');
for (var i of prefix_suffix) {
text = text.replace(i, "");
}
return Number.fromLocaleString(text);
}
onValueModified: Settings.bitrate = value
}
Kirigami.InlineMessage {
Layout.fillWidth: true
text: i18n("The current encoder configuration is not supported")
@@ -156,62 +80,13 @@ Kirigami.ScrollablePage {
}
}
RowLayout {
Kirigami.FormData.label: i18n("Codec:")
Controls.ComboBox {
id: codec_combo
enabled: Settings.simpleConfig && Settings.encoder != Settings.EncoderAuto
model: [
{
label: i18nc("automatic codec setup", "Auto"),
codec: Settings.CodecAuto
},
{
label: i18n("H.264"),
codec: Settings.H264
},
{
label: i18n("H.265"),
codec: Settings.H265
},
{
label: i18n("AV1"),
codec: Settings.Av1
}
]
onCurrentIndexChanged: if (settings.allowUpdates) {Settings.codec = model[currentIndex].codec}
textRole: "label"
delegate: Controls.ItemDelegate {
required property string label
required property var codec
width: codec_combo.width
text: i18n(label)
highlighted: ListView.isCurrentItem
enabled: Settings.allowedCodecs.includes(codec)
}
Connections {
target: Settings
function onCodecChanged() {
var codec = Settings.codec;
var i = codec_combo.model.findIndex( item => item.codec == codec)
if (i > -1)
codec_combo.currentIndex = i
}
}
}
Controls.CheckBox {
enabled: Settings.can10bit
text: i18n("10 bits")
checked: Settings.tenbit
onCheckedChanged: Settings.tenbit = checked
}
Kirigami.ContextualHelpButton {
toolTipText: i18n("10-bit encoding improves image quality but is not supported by all codecs and hardware")
}
Kirigami.Separator {
Kirigami.FormData.isSection: true
}
SelectGame {
Kirigami.FormData.label: i18n("Autostart application:")
}
Kirigami.Separator {
Kirigami.FormData.isSection: true
@@ -372,15 +247,11 @@ Kirigami.ScrollablePage {
Component.onCompleted: {
openvr_libs.init()
Settings.load(WivrnServer);
// If bitrate was manually set higher, keep the limit
bitrate.to = Math.max(bitrate.to, Settings.bitrate)
bitrate.value = Settings.bitrate
settings.allowUpdates = true;
settings.load();
}
function save() {
Settings.scale = manual_foveation.checked ? 1 - scale_slider.value / 100.0 : -1;
let openvr = openvr_combobox.model.get(openvr_combobox.currentIndex)
if (openvr.is_custom) {
Settings.openvr = openvr_text.text;
@@ -399,12 +270,6 @@ Kirigami.ScrollablePage {
}
function load() {
if (Settings.scale > 0) {
scale_slider.value = Math.round(100 - Settings.scale * 100);
} else {
scale_slider.value = 50;
}
debug_gui.checked = Settings.debugGui;
steamvr_lh.checked = Settings.steamVrLh;
hid_forwarding.checked = Settings.hidForwarding;
@@ -419,6 +284,6 @@ Kirigami.ScrollablePage {
Shortcut {
sequences: [StandardKey.Cancel]
onActivated: applicationWindow().pageStack.pop()
onActivated: {if (isCurrentPage) applicationWindow().pageStack.pop();}
}
}
+5 -1
View File
@@ -57,6 +57,10 @@ Kirigami.ScrollablePage {
title: i18n("I have no sound on my headset")
details: i18n("When the headset is connected, select \"WiVRn\" as the default audio output device for applications to use it.")
}
TroubleshootCard {
title: i18n("Some games fail to start or have input issues")
details: i18n("For game specific issues, check on <a href=\"https://db.vronlinux.org/\">vronlinux DB</a> if there are known bugs or workarounds.")
}
}
footer: Controls.DialogButtonBox {
@@ -90,6 +94,6 @@ Kirigami.ScrollablePage {
Shortcut {
sequences: [StandardKey.Cancel]
onActivated: applicationWindow().pageStack.pop()
onActivated: {if (isCurrentPage) applicationWindow().pageStack.pop();}
}
}
+29 -64
View File
@@ -248,70 +248,6 @@ Kirigami.ScrollablePage {
// image: Qt.resolvedUrl("wivrn.svg")
actions: [
Kirigami.Action {
text: i18n("Back")
icon.name: "go-previous"
onTriggered: pageStack.goBack()
},
Kirigami.Action {
text: i18n("Next")
icon.name: "go-next"
onTriggered: pageStack.push(page_selectgame_component.createObject(pageStack))
},
Kirigami.Action {
text: i18n("Cancel")
onTriggered: wizard.cancel()
}
]
}
}
Component {
id: page_selectgame_component
WizardStep {
id: page_selectgame
Controls.Label {
Layout.fillWidth: true
wrapMode: Text.WordWrap
font.pointSize: Kirigami.Theme.defaultFont.pointSize * 1.35
text: i18n("Select the application you want to start")
}
Controls.Label {
Layout.fillWidth: true
wrapMode: Text.WordWrap
text: i18n("The application you choose will be started automatically when you connect your headset.")
Layout.topMargin: 2 * Kirigami.Units.largeSpacing
}
SelectGame {}
SteamLaunchOptions {
visible: WivrnServer.steamCommand != ""
Layout.topMargin: 2 * Kirigami.Units.largeSpacing
}
Controls.Label {
Layout.fillWidth: true
wrapMode: Text.WordWrap
font.pointSize: Kirigami.Theme.defaultFont.pointSize * 1.35
text: i18n("Important information")
Layout.topMargin: 2 * Kirigami.Units.largeSpacing
}
Controls.Label {
Layout.fillWidth: true
wrapMode: Text.WordWrap
text: i18n("WiVRn entirely replaces SteamVR, you should not start SteamVR while WiVRn is running.")
}
Item {
Layout.fillHeight: true
}
actions: [
Kirigami.Action {
text: i18n("Back")
@@ -352,11 +288,30 @@ Kirigami.ScrollablePage {
pageStack.push(page_connected_component.createObject(pageStack));
}
Controls.Label {
Layout.fillWidth: true
wrapMode: Text.WordWrap
font.pointSize: Kirigami.Theme.defaultFont.pointSize * 1.35
text: i18n("Important information")
}
Controls.Label {
Layout.fillWidth: true
wrapMode: Text.WordWrap
text: i18n("WiVRn entirely replaces SteamVR, you should not start SteamVR while WiVRn is running.")
}
SteamLaunchOptions {
visible: WivrnServer.steamCommand != ""
Layout.topMargin: 2 * Kirigami.Units.largeSpacing
}
Controls.Label {
Layout.fillWidth: true
wrapMode: Text.WordWrap
font.pointSize: Kirigami.Theme.defaultFont.pointSize * 1.35
text: i18n("Start the WiVRn app on your headset")
Layout.topMargin: 2 * Kirigami.Units.largeSpacing
}
Controls.Label {
Layout.fillWidth: true
@@ -374,6 +329,16 @@ Kirigami.ScrollablePage {
text: i18n("Connect by USB")
onClicked: select_usb_device.connect()
enabled: select_usb_device.connected_headset_count > 0
Controls.ToolTip.visible: WivrnServer.serverStatus == WivrnServer.Started&& hovered
Controls.ToolTip.delay: Kirigami.Units.toolTipDelay
Controls.ToolTip.text: {
if (!Adb.adbInstalled)
return i18n("ADB is not installed");
if (select_usb_device.connected_headset_count == 0)
return i18n("No headset is connected or your headset is not in developer mode");
return "";
}
}
}
Controls.Label {
+94 -121
View File
@@ -114,8 +114,6 @@ void Settings::emitAllChanged()
encoderChanged();
codecChanged();
tenbitChanged();
bitrateChanged();
scaleChanged();
tcpOnlyChanged();
applicationChanged();
openvrChanged();
@@ -145,41 +143,49 @@ void Settings::load(const wivrn_server * server)
}
}
static Settings::encoder_name encoder_for_item(const nlohmann::json & item)
{
if (item.is_string())
return Settings::encoder_id_from_string(std::string(item));
if (item.is_object())
{
if (auto i = item.find("encoder"); i != item.end())
return Settings::encoder_id_from_string(std::string(*i));
}
return Settings::encoder_name::EncoderAuto;
}
static Settings::video_codec codec_for_item(const nlohmann::json & item)
{
if (item.is_object())
{
if (auto i = item.find("codec"); i != item.end())
return Settings::codec_id_from_string(std::string(*i));
}
return Settings::video_codec::CodecAuto;
}
bool Settings::simpleConfig() const
{
// Simple configuration: either unset, or all encoders + codecs are the same
// Simple configuration: either unset, single encoder or all encoders + codecs are the same
try
{
auto it = m_jsonSettings.find("encoders");
if (it == m_jsonSettings.end())
auto it = m_jsonSettings.find("encoder");
if (it == m_jsonSettings.end() or it->is_object() or it->is_string())
return true;
std::optional<encoder_name> encoder;
std::optional<video_codec> codec;
for (const auto & item: *it)
{
if (auto it = item.find("encoder"); it != item.end())
{
auto e = encoder_id_from_string(std::string(*it));
if (encoder and e != encoder)
return false;
encoder = e;
}
else
{
encoder = encoder_name::EncoderAuto;
}
auto e = encoder_for_item(item);
if (encoder and e != encoder)
return false;
encoder = e;
if (auto it = item.find("codec"); it != item.end())
{
auto e = codec_id_from_string(std::string(*it));
if (codec and e != codec)
return false;
codec = e;
}
else
{
codec = video_codec::CodecAuto;
}
auto c = codec_for_item(item);
if (codec and c != codec)
return false;
codec = c;
}
return true;
}
@@ -193,15 +199,12 @@ Settings::encoder_name Settings::encoder() const
{
try
{
auto it = m_jsonSettings.find("encoders");
auto it = m_jsonSettings.find("encoder");
if (it == m_jsonSettings.end())
return encoder_name::EncoderAuto;
for (const auto & item: *it)
{
if (auto it = item.find("encoder"); it != item.end())
return encoder_id_from_string(std::string(*it));
return encoder_name::EncoderAuto;
}
if (it->is_array() and it->size())
it = it->begin();
return encoder_for_item(*it);
}
catch (...)
{
@@ -211,42 +214,23 @@ Settings::encoder_name Settings::encoder() const
void Settings::set_encoder(const encoder_name & value)
{
auto old = encoder();
if (value == encoder())
return;
auto old_codec = codec();
switch (value)
{
case EncoderAuto:
m_jsonSettings.erase("encoders");
m_jsonSettings.erase("encoder");
break;
case Nvenc:
case Vaapi:
case Vulkan: {
auto & enc = m_jsonSettings["encoders"] = nlohmann::json::array();
for (float offset: {0.f, 0.5f})
{
auto obj = nlohmann::json::object({
{"width", 0.5},
{"encoder", encoder_from_id(value)},
});
if (offset)
obj["offset_x"] = offset;
if (value == Vulkan)
obj["codec"] = "h264";
enc.push_back(obj);
}
}
break;
case encoder_name::X264:
m_jsonSettings["encoders"] =
nlohmann::json::parse(R"([{"encoder": "x264", "codec": "h264"}])");
break;
}
if (value != old)
{
encoderChanged();
if (not can10bit())
set_tenbit(false);
case X264:
case Vulkan:
m_jsonSettings["encoder"] = encoder_from_id(value);
}
encoderChanged();
if (not can10bit())
set_tenbit(false);
if (old_codec != codec())
codecChanged();
simpleConfigChanged();
@@ -256,15 +240,12 @@ Settings::video_codec Settings::codec() const
{
try
{
auto it = m_jsonSettings.find("encoders");
auto it = m_jsonSettings.find("encoder");
if (it == m_jsonSettings.end())
return video_codec::CodecAuto;
for (const auto & item: *it)
{
if (auto it = item.find("codec"); it != item.end())
return codec_id_from_string(std::string(*it));
return video_codec::CodecAuto;
}
if (it->is_array() and it->size())
it = it->begin();
return codec_for_item(*it);
}
catch (...)
{
@@ -275,17 +256,49 @@ Settings::video_codec Settings::codec() const
void Settings::set_codec(const video_codec & value)
{
auto old = codec();
auto it = m_jsonSettings.find("encoders");
if (it == m_jsonSettings.end() or not it->is_array())
auto it = m_jsonSettings.find("encoder");
if (it == m_jsonSettings.end())
return;
for (auto & item: *it)
if (it->is_string())
{
m_jsonSettings["encoder"] = nlohmann::json::object({
{"encoder", *it},
{"codec", codec_from_id(value)},
});
}
if (it->is_object())
{
if (not item.is_object())
continue;
if (value == CodecAuto)
item.erase("codec");
{
if (auto encoder = it->find("encoder"); encoder != it->end())
*it = *encoder;
else
m_jsonSettings.erase("encoder");
}
else
item["codec"] = codec_from_id(value);
(*it)["codec"] = codec_from_id(value);
}
else if (it->is_array())
{
for (auto & item: *it)
{
if (it->is_string())
{
item = nlohmann::json::object({
{"encoder", item},
{"codec", codec_from_id(value)},
});
continue;
}
if (not item.is_object())
continue;
if (value == CodecAuto)
item.erase("codec");
else
item["codec"] = codec_from_id(value);
}
}
if (value != old)
{
@@ -309,51 +322,14 @@ bool Settings::tenbit() const
void Settings::set_tenbit(const bool & value)
{
auto old = tenbit();
m_jsonSettings["bit-depth"] = value ? 10 : 8;
if (codec() == CodecAuto)
m_jsonSettings.erase("bit-depth");
else
m_jsonSettings["bit-depth"] = value ? 10 : 8;
if (value != old)
tenbitChanged();
}
int Settings::bitrate() const
{
try
{
return m_jsonSettings.value("bitrate", 50'000'000) / 1'000'000;
}
catch (...)
{
return 50;
}
}
void Settings::set_bitrate(const int & value)
{
auto old = bitrate();
m_jsonSettings["bitrate"] = value * 1'000'000;
if (old != value)
bitrateChanged();
}
float Settings::scale() const
{
// Foveation
auto it = m_jsonSettings.find("scale");
if (it != m_jsonSettings.end() and it->is_number())
return *it;
return -1;
}
void Settings::set_scale(const float & value)
{
auto old = scale();
if (value == -1)
m_jsonSettings.erase("scale");
else
m_jsonSettings["scale"] = value;
if (old != value)
scaleChanged();
}
QString Settings::application() const
{
// Automatically started application
@@ -520,10 +496,7 @@ void Settings::save(wivrn_server * server)
void Settings::restore_defaults()
{
m_jsonSettings.erase("encoders");
m_jsonSettings.erase("encoder-passthrough");
m_jsonSettings.erase("scale");
m_jsonSettings.erase("bitrate");
m_jsonSettings.erase("encoder");
m_jsonSettings.erase("application");
m_jsonSettings.erase("hid-forwarding");
m_jsonSettings.erase("debug-gui");
-4
View File
@@ -66,8 +66,6 @@ public:
Q_PROPERTY(QList<video_codec> allowedCodecs READ allowedCodecs NOTIFY encoderChanged)
Q_PROPERTY(bool can10bit READ can10bit NOTIFY codecChanged)
Q_PROPERTY(bool tenbit READ tenbit WRITE set_tenbit NOTIFY tenbitChanged)
Q_PROPERTY(int bitrate READ bitrate WRITE set_bitrate NOTIFY bitrateChanged)
Q_PROPERTY(float scale READ scale WRITE set_scale NOTIFY scaleChanged)
Q_PROPERTY(bool tcpOnly READ tcpOnly WRITE set_tcpOnly NOTIFY tcpOnlyChanged)
Q_PROPERTY(QString application READ application WRITE set_application NOTIFY applicationChanged)
@@ -86,8 +84,6 @@ public:
SETTER_GETTER_NOTIFY(encoder_name, encoder)
SETTER_GETTER_NOTIFY(video_codec, codec)
SETTER_GETTER_NOTIFY(bool, tenbit)
SETTER_GETTER_NOTIFY(int, bitrate)
SETTER_GETTER_NOTIFY(float, scale)
SETTER_GETTER_NOTIFY(QString, application)
SETTER_GETTER_NOTIFY(bool, hidForwarding)
SETTER_GETTER_NOTIFY(bool, debugGui)
+5
View File
@@ -439,6 +439,11 @@ void wivrn_server::on_server_properties_changed(const QString & interface_name,
supportedCodecsChanged(m_supportedCodecs = changed_properties["SupportedCodecs"].toStringList());
}
if (changed_properties.contains("SystemName"))
{
systemNameChanged(m_systemName = changed_properties["SystemName"].toString());
}
if (changed_properties.contains("SteamCommand"))
{
steamCommandChanged(m_steamCommand = changed_properties["SteamCommand"].toString());
+8
View File
@@ -204,6 +204,7 @@ public:
Q_PROPERTY(int speakerChannels READ speakerChannels NOTIFY speakerChannelsChanged)
Q_PROPERTY(int speakerSampleRate READ speakerSampleRate NOTIFY speakerSampleRateChanged)
Q_PROPERTY(QStringList supportedCodecs READ supportedCodecs NOTIFY supportedCodecsChanged)
Q_PROPERTY(QString systemName READ systemName NOTIFY systemNameChanged)
Q_PROPERTY(QString steamCommand READ steamCommand NOTIFY steamCommandChanged)
// hostnamed
@@ -317,6 +318,11 @@ public:
return m_supportedCodecs;
}
QString systemName() const
{
return m_systemName;
}
QString steamCommand() const
{
return m_steamCommand;
@@ -368,6 +374,7 @@ private:
int m_speakerChannels{};
int m_speakerSampleRate{};
QStringList m_supportedCodecs{};
QString m_systemName{};
QString m_steamCommand{};
Q_SIGNALS:
@@ -394,6 +401,7 @@ Q_SIGNALS:
void speakerSampleRateChanged(int);
void supportedCodecsChanged(QStringList);
void steamCommandChanged(QString);
void systemNameChanged(QString);
void serverLogsChanged(QString);
void serverError(serverErrorData);
};
+2 -4
View File
@@ -45,12 +45,9 @@
<property name="SessionRunning" type="b" access="read"/>
<property name="SteamCommand" type="s" access="read"/>
<property name="JsonConfiguration" type="s" access="readwrite"/>
<property name="Bitrate" type="u" access="readwrite"/>
<property name="Bitrate" type="u" access="read"/>
<!-- Data from the headset info packet -->
<property name="RecommendedEyeSize" type="(uu)" access="read">
<annotation name="org.qtproject.QtDBus.QtTypeName" value="QSize"/>
</property>
<property name="AvailableRefreshRates" type="ad" access="read">
<annotation name="org.qtproject.QtDBus.QtTypeName" value="QList&lt;double&gt;"/>
</property>
@@ -66,6 +63,7 @@
<property name="EyeGaze" type="b" access="read"/>
<property name="FaceTracking" type="b" access="read"/>
<property name="SupportedCodecs" type="as" access="read"/>
<property name="SystemName" type="s" access="read"/>
<property name="Pin" type="s" access="read"/>
<property name="KnownKeys" type="a(ssx)" access="read">
+10 -18
View File
@@ -2,19 +2,6 @@
# Server (PC)
## Dependencies
WiVRn requires avahi-client, eigen3, gettext, libpulse, libsystemd, nlohmann_json, librsvg2.
It also requires at least one encoder:
* For nvenc (Nvidia), it requires cuda and nvidia driver
* For vaapi (AMD/Intel), it requires ffmpeg with vaapi and libdrm support, as well as vaapi drivers for the GPU
* For vulkan (Any modern GPU), it requires vulkan headers of 1.3.283 or later, as well as vulkan drivers for the GPU
* For x264 (software encoding), it requires libx264
Some distributions such as Fedora don't ship h264 and h265 encoders and need specific repositories.
## Compile
From your checkout directory, with automatic detection of encoders
@@ -23,12 +10,12 @@ cmake -B build-server . -GNinja -DWIVRN_BUILD_CLIENT=OFF -DCMAKE_BUILD_TYPE=RelW
cmake --build build-server
```
It is possible to force specific encoders, by adding options
It is possible to disable specific encoders, by adding options
```
-DWIVRN_USE_NVENC=ON
-DWIVRN_USE_VAAPI=ON
-DWIVRN_USE_VULKAN_ENCODE=ON
-DWIVRN_USE_X264=ON
-DWIVRN_USE_NVENC=OFF
-DWIVRN_USE_VAAPI=OFF
-DWIVRN_USE_VULKAN_ENCODE=OFF
-DWIVRN_USE_X264=OFF
```
Force specific audio backends
@@ -42,6 +29,11 @@ Systemd service and pretty hostname support
-DWIVRN_USE_SYSTEMD=ON
```
Lighthouse driver support for use with lighthouse-tracked devices
```
-DWIVRN_FEATURE_STEAMVR_LIGHTHOUSE=ON
```
Additionally, if your environment requires absolute paths inside the OpenXR runtime manifest, you can add `-DWIVRN_OPENXR_MANIFEST_TYPE=absolute` to the build configuration.
# Dashboard
+16 -90
View File
@@ -12,43 +12,16 @@ If you installed WiVRn from a flatpack, the config is in `$HOME/.var/app/io.gith
All elements are optional and have default values.
## `scale`
Default value: `0.5`, `0.35` if headset supports eye tracking
Controls the size of the video stream, either a number between 0 and 1 or a pair of numbers between 0 and 1. If two numbers are provided the first one is horizontal scale and the second vertical.
Scaling is applied in a foveated fashion: the center has a 1:1 ratio and the rest is scaled so that the total number of pixels matches the desired scale.
### Examples:
```json
{
"scale": 0.5
}
```
The x and y resolution of the streamed video are half the size on the headset, reduces the required bandwidth and encoding/decoding time by about 4.
```json
{
"scale": [0.75, 0.5]
}
```
Scales x by a 0.75 factor, and y by a 0.5 factor.
## `bitrate`
Default value: `50000000` (50Mb/s)
Bitrate of the video, in bit/s. Split among decoders based on size and codecs.
## `bit-depth`
Default value: `8` (bits)
Bit depth of the video. 8-bit is supported by all encoders. 10-bit is supported by `vaapi` and `nvenc` encoders using `h265` or `av1`.
## `encoders`
A list of encoders to use.
## `encoder`
The encoder to use, either a single string or object applied to all streams, or a list of string or objects with values for left, right and alpha.
When a string it is used, it is equivalent to the `encoder` item of the object.
Default value: one encoder per eye
WiVRn has the ability to split the video in blocks that are processed independently, this may use resources more effectively and reduce latency.
WiVRn encodes each eye separately, and the alpha channel as one for both eyes. Each stream is processed independently, this may use resources more effectively and reduce latency.
All the provided encoders are put into groups, groups are executed concurrently and items within a group are processed sequentially.
### `encoder`
@@ -61,7 +34,7 @@ Identifier of the encoder, one of
* `vulkan`: experimental, for any GPU that supports vulkan video encode
### `codec`
Default value: first supported by both headset and encoder of `av1`, `h264`, `h265`.
Default value: best supported by both headset and encoder of `av1`, `h264`, `h265`.
One of `h264`, `h265`, `av1`, `raw`.
@@ -73,86 +46,44 @@ Not all encoders support every codec:
If `nvenc` encoder is in use, you can refer to [nvidia website](https://developer.nvidia.com/video-encode-decode-support-matrix) to make sure that your GPU supports encoding with the desired codec.
### `width`, `height`, `offset_x`, `offset_y` (advanced)
Default values: full image (`width` = 1, `height` = 1, `offset_x` = 0, `offset_y` = 0)
Specifies the portion of the video to encode: all values are in 0, 1 range. Left eye image ranges from x 0 to x 0.5 and y 0 to 1, Rigth eye is x from 0.5 to 1 and y 0 to 1.
### `group` (very advanced)
### `group` (advanced)
Default value: One value for each encoder type (nvenc, vaapi, vulkan, x264).
Identifier (number) of the encoder group. Encoders with the same identifier are executed sequentially, in the order they are defined in the configuration. Encoders with different identifiers are executed concurrently.
Default setting will have all encoders of a given type execute sequentially, and different types in parallel.
### Examples
1. Simple encoder
1. Simple configuration
```json
{
"bitrate": 50000000,
"encoders": [
{
"encoder": "vaapi",
"codec": "h265"
}
]
"encoder": {
"encoder": "vaapi",
"codec": "h265"
}
}
```
Creates a single encoder, using vaapi hardware encoding, h265 video codec (HEVC) and 50Mb/s bitrate.
Use vaapi hardware encoding, h265 video codec (HEVC).
2. Hardware + software encoder
```json
{
"bitrate": 50000000,
"encoders": [
"encoder": [
{
"encoder": "vaapi",
"codec": "h265",
"width": 0.5,
"height": 1,
"offset_x": 0,
"offset_y": 0
},
{
"encoder": "x264",
"codec": "h264",
"width": 0.5,
"height": 1,
"offset_x": 0.5,
"offset_y": 0
}
]
}
```
Creates a hardware encoder for left eye, and a software encoder for right eye.
3. 2 Hardware encoders
```json
{
"bitrate": 50000000,
"encoders": [
{
"encoder": "vaapi",
"codec": "h265",
"width": 0.5,
"height": 1,
"offset_x": 0,
"offset_y": 0,
"group": 0
},
{
"encoder": "vaapi",
"codec": "h264",
"width": 0.5,
"height": 1,
"offset_x": 0.5,
"offset_y": 0,
"group": 0
}
"codec": "h265",
},
]
}
```
Creates two hardware encoders, one for left eye and one for right eye, executed sequentially as they have the same `group`.
This allows the left eye image to be encoded faster than the full image would be, so network transfer starts earlier, and decoding starts earlier. While the total encoding, transfer and decoding time remain the same or are longer, this can reduce the latency.
Creates a hardware encoder for left eye and transparency, and a software encoder for right eye.
### `device`, only for vaapi
Default value: unset
@@ -165,11 +96,6 @@ Default value: unset
Json object of additional options to pass directly to ffmpeg `avcodec_open2`'s `option` parameter.
## `encoder-passthrough`
The single encoder used for passthrough (transparency), contains the same elements as the other encoders, except for width/height and offsets which are ignored.
Default values are those computed for the first encoder.
## `application`
Default value: unset
+8 -8
View File
@@ -1,14 +1,14 @@
# Notes for OpenVR and Steam
WiVRn only provides an OpenXR runtime. For games that use OpenVR, [OpenComposite](https://gitlab.com/znixian/OpenOVR/) should be used to translate the APIs.
WiVRn only provides an OpenXR runtime. For games that use OpenVR, [xrizer](https://github.com/Supreeeme/xrizer) or [OpenComposite](https://gitlab.com/znixian/OpenOVR/) should be used to translate the APIs.
If using Steam, games will be sandboxed by pressure vessel, which is not OpenXR aware yet.
- Files under `/usr` are mapped into `/run/host/usr`, if OpenComposite or WiVRn are installed there, make sure that `XR_RUNTIME_JSON` uses `/run/host/usr` prefix and that `VR_OVERRIDE` or `~/.config/openvr/openvrpaths.vrpath` also uses this configuration.
- WiVRn uses a socket to communicate between the application and the server process, this socket needs to be whitelisted as `PRESSURE_VESSEL_FILESYSTEMS_RW=$XDG_RUNTIME_DIR/wivrn/comp_ipc`.
If using Steam, games will be sandboxed by pressure vessel, which does not passthrough OpenXR by default.
- Files under `/usr` are mapped into `/run/host/usr`. If xrizer/OpenComposite is installed there, make sure `VR_OVERRIDE` or `~/.config/openvr/openvrpaths.vrpath` uses `/run/host/usr` prefix.
- `PRESSURE_VESSEL_IMPORT_OPENXR_1_RUNTIMES=1` must be set to passthrough the WiVRn OpenXR manifest, library locations, and socket location.
By default, WiVRn attempts to automatically find OpenComposite in a number of places:
- When WiVRn is shipped as a flatpak, it uses a provided copy of OpenComposite by default.
- WiVRn attempts to autodetect OpenComposite in a number of places (see `OVR_COMPAT_SEARCH_PATH` in `CMakeLists.txt`).
By default, WiVRn attempts to automatically find xrizer and OpenComposite in a number of places:
- When WiVRn is shipped as a flatpak, it uses a provided copy of xrizer by default.
- WiVRn attempts to autodetect xrizer and OpenComposite in a number of places (see `OVR_COMPAT_SEARCH_PATH` in `CMakeLists.txt`).
- The `openvr-compat-path` configuration may be used for an unexpected install location.
If it is found, WiVRn adjusts the `openvrpaths.vrpath` file, and includes whitelisting the OpenComposite path and setting `VR_OVERRIDE` in the environment variables.
If it is found, WiVRn adjusts the `openvrpaths.vrpath` file, and includes whitelisting the xrizer/OpenComposite path and setting `VR_OVERRIDE` in the environment variables.

Some files were not shown because too many files have changed in this diff Show More