The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

a/util: Use per-channel display size

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2595>

+4 -3
+4 -3
src/xrt/auxiliary/util/u_distortion_mesh.c
··· 473 473 for (int channel = 0; channel < 3; channel++) { 474 474 const struct xrt_vec2 eye_center = values[channel].eye_center; 475 475 const double *k = values[channel].k; 476 + const struct xrt_vec2_i32 display_size = values[channel].display_size; 476 477 477 478 /* The X coords start at 0 for the left eye, and display_size.x / 2.0 for the right */ 478 479 const struct xrt_vec2 pix_coords[4] = { 479 480 /* -eye_center_x, 0 */ 480 - {(1.0f * view) * (values->display_size.x / 2.0f) - eye_center.x, 0.0f}, 481 + {(1.0f * view) * (display_size.x / 2.0f) - eye_center.x, 0.0f}, 481 482 /* 0, -eye_center_y */ 482 483 {0.0f, -eye_center.y}, 483 484 /* width-eye_center_x, 0 */ 484 - {(1.0f + 1.0f * view) * (values->display_size.x / 2.0f) - eye_center.x, 0.0f}, 485 + {(1.0f + 1.0f * view) * (display_size.x / 2.0f) - eye_center.x, 0.0f}, 485 486 /* 0, height-eye_center_y */ 486 - {0.0f, values->display_size.y - eye_center.y}, 487 + {0.0f, display_size.y - eye_center.y}, 487 488 }; 488 489 489 490 for (int c = 0; c < 4; c++) {