Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -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))
|
||||
{
|
||||
@@ -1422,7 +1422,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,
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -248,6 +248,14 @@ 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;
|
||||
// We can't start the face tracking on application initialisation like we do for
|
||||
// other face trackers due to a Pico runtime bug where face tracking freezes when
|
||||
// the headset is taken off or the application is quit.
|
||||
application::get_pico_face_tracker().start();
|
||||
}
|
||||
}
|
||||
|
||||
on_interaction_profile_changed({});
|
||||
@@ -334,10 +342,10 @@ void scenes::stream::tracking()
|
||||
case wivrn::from_headset::face_type::none:
|
||||
break;
|
||||
case wivrn::from_headset::face_type::fb2:
|
||||
application::get_fb_face_tracker2().get_weights(t0 + Δt, packet.face.emplace());
|
||||
application::get_fb_face_tracker2().get_weights(t0 + Δt, packet.face.emplace<wivrn::from_headset::tracking::fb_face2>());
|
||||
break;
|
||||
case wivrn::from_headset::face_type::htc:
|
||||
auto & face_htc = packet.face_htc.emplace();
|
||||
case wivrn::from_headset::face_type::htc: {
|
||||
auto & face_htc = packet.face.emplace<wivrn::from_headset::tracking::htc_face>();
|
||||
face_htc.eye_active = false;
|
||||
face_htc.lip_active = false;
|
||||
if (application::get_htc_face_tracking_eye_supported())
|
||||
@@ -345,6 +353,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.emplace<wivrn::from_headset::tracking::fb_face2>());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -438,6 +450,9 @@ void scenes::stream::tracking()
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
if (face_tracking == from_headset::face_type::pico)
|
||||
application::get_pico_face_tracker().stop();
|
||||
}
|
||||
|
||||
void scenes::stream::operator()(to_headset::tracking_control && packet)
|
||||
|
||||
Reference in New Issue
Block a user