WIP: Pico 4 Pro face tracking

This commit is contained in:
Sapphire
2025-06-01 10:21:47 +02:00
committed by xytovl
parent 5130bdeda5
commit 908d21ffec
23 changed files with 655 additions and 3 deletions
+2 -2
View File
@@ -727,7 +727,7 @@ void scenes::lobby::gui_settings()
ImGui::EndDisabled();
}
{
ImGui::BeginDisabled(not(application::get_fb_face_tracking2_supported() or application::get_htc_face_tracking_eye_supported() or application::get_htc_face_tracking_lip_supported()));
ImGui::BeginDisabled(not(application::get_fb_face_tracking2_supported() or application::get_htc_face_tracking_eye_supported() or application::get_htc_face_tracking_lip_supported() or application::get_pico_face_tracking_supported()));
bool enabled = config.check_feature(feature::face_tracking);
if (ImGui::Checkbox(_S("Enable face tracking"), &enabled))
{
@@ -1419,7 +1419,7 @@ void scenes::lobby::draw_features_status(XrTime predicted_display_time)
});
}
if (application::get_htc_face_tracking_eye_supported() or application::get_htc_face_tracking_lip_supported())
if (application::get_htc_face_tracking_eye_supported() or application::get_htc_face_tracking_lip_supported() or application::get_pico_face_tracking_supported())
{
items.push_back({
.f = feature::face_tracking,
+2
View File
@@ -220,6 +220,8 @@ std::shared_ptr<scenes::stream> scenes::stream::create(std::unique_ptr<wivrn_ses
info.face_tracking = from_headset::face_type::fb2;
else if (application::get_htc_face_tracking_eye_supported() or application::get_htc_face_tracking_lip_supported())
info.face_tracking = from_headset::face_type::htc;
else if (application::get_pico_face_tracking_supported())
info.face_tracking = from_headset::face_type::pico;
}
info.palm_pose = application::space(xr::spaces::palm_left) or application::space(xr::spaces::palm_right);
+7 -1
View File
@@ -248,6 +248,8 @@ void scenes::stream::tracking()
face_tracking = from_headset::face_type::fb2;
else if (application::get_htc_face_tracking_eye_supported() or application::get_htc_face_tracking_lip_supported())
face_tracking = from_headset::face_type::htc;
else if (application::get_pico_face_tracking_supported())
face_tracking = from_headset::face_type::pico;
}
on_interaction_profile_changed({});
@@ -336,7 +338,7 @@ void scenes::stream::tracking()
case wivrn::from_headset::face_type::fb2:
application::get_fb_face_tracker2().get_weights(t0 + Δt, packet.face.emplace());
break;
case wivrn::from_headset::face_type::htc:
case wivrn::from_headset::face_type::htc: {
auto & face_htc = packet.face_htc.emplace();
face_htc.eye_active = false;
face_htc.lip_active = false;
@@ -345,6 +347,10 @@ void scenes::stream::tracking()
if (application::get_htc_face_tracking_lip_supported())
application::get_htc_face_tracker_lip().get_weights(t0 + Δt, face_htc);
break;
}
case wivrn::from_headset::face_type::pico:
application::get_pico_face_tracker().get_weights(t0 + Δt, packet.face_pico.emplace());
break;
}
}
}