eye-tracked foveation

This commit is contained in:
galister
2024-08-30 11:24:36 +02:00
committed by xytovl
parent bb22403f7e
commit 8503e3480b
17 changed files with 888 additions and 33 deletions
+3
View File
@@ -543,6 +543,7 @@ void scenes::stream::render(const XrFrameState & frame_state)
std::array<XrPosef, 2> pose{};
std::array<XrFovf, 2> fov{};
std::array<xrt::drivers::wivrn::to_headset::foveation_parameter, 2> foveation{};
{
// Search for frame with desired display time on all decoders
// If no such frame exists, use the latest frame for each decoder
@@ -562,6 +563,7 @@ void scenes::stream::render(const XrFrameState & frame_state)
pose = blit_handle->view_info.pose;
fov = blit_handle->view_info.fov;
foveation = blit_handle->view_info.foveation;
vk::DescriptorImageInfo image_info{
.imageView = *blit_handle->image_view,
@@ -662,6 +664,7 @@ void scenes::stream::render(const XrFrameState & frame_state)
}
command_buffer.writeTimestamp(vk::PipelineStageFlagBits::eBottomOfPipe, *query_pool, 1);
reprojector->set_foveation(foveation);
// Unfoveate the image to the real pose
for (size_t view = 0; view < view_count; view++)