1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Merge pull request #100282 from devloglogan/motion-vectors-openxr

Add renderer motion vectors API for use with OpenXR
This commit is contained in:
Thaddeus Crews
2024-12-12 16:13:36 -06:00
25 changed files with 429 additions and 12 deletions

View File

@@ -1071,6 +1071,30 @@ RID OpenXRInterface::get_depth_texture() {
}
}
RID OpenXRInterface::get_velocity_texture() {
if (openxr_api) {
return openxr_api->get_velocity_texture();
} else {
return RID();
}
}
RID OpenXRInterface::get_velocity_depth_texture() {
if (openxr_api) {
return openxr_api->get_velocity_depth_texture();
} else {
return RID();
}
}
Size2i OpenXRInterface::get_velocity_target_size() {
if (openxr_api) {
return openxr_api->get_velocity_target_size();
} else {
return Size2i();
}
}
void OpenXRInterface::handle_hand_tracking(const String &p_path, OpenXRHandTrackingExtension::HandTrackedHands p_hand) {
OpenXRHandTrackingExtension *hand_tracking_ext = OpenXRHandTrackingExtension::get_singleton();
if (hand_tracking_ext && hand_tracking_ext->get_active()) {