71 float aspect_x_over_y;
72 float grow_for_undistort;
76 float undistort_r2_cutoff;
121 float x_coefficients_left[16];
122 float x_coefficients_right[16];
123 float y_coefficients_left[16];
124 float y_coefficients_right[16];
146 int num_grid_points_u;
147 int num_grid_points_v;
198u_compute_distortion_poly_3k(
206u_compute_distortion_bounds_poly_3k(
const struct xrt_matrix_3x3 *inv_affine_xform,
220#define U_RIFT_CHROMATIC_ABBERATION_COUNT 4
void u_distortion_mesh_fill_in_none(struct xrt_device *xdev)
Given a xrt_device generates a no distortion mesh, populates xdev->hmd_parts.distortion....
Definition u_distortion_mesh.c:560
void u_distortion_mesh_fill_in_compute(struct xrt_device *xdev)
Given a xrt_device generates meshes by calling xdev->compute_distortion(), populates xdev->hmd_parts....
Definition u_distortion_mesh.c:598
void u_compute_distortion_cardboard(struct u_cardboard_distortion_values *values, float u, float v, struct xrt_uv_triplet *result)
Distortion correction implementation for the Cardboard devices.
Definition u_distortion_mesh.c:235
void u_distortion_mesh_set_none(struct xrt_device *xdev)
Given a xrt_device generates a no distortion mesh, also sets xdev->compute_distortion() and populates...
Definition u_distortion_mesh.c:574
void u_compute_distortion_ns_p2d(struct u_ns_p2d_values *values, int view, float u, float v, struct xrt_uv_triplet *result)
Distortion correction implementation for North Star 2D/Polynomial.
Definition u_distortion_mesh.c:291
xrt_result_t u_distortion_mesh_none(struct xrt_device *xdev, uint32_t view, float u, float v, struct xrt_uv_triplet *result)
Helper function for none distortion devices.
Definition u_distortion_mesh.c:548
void u_compute_distortion_vive(struct u_vive_values *values, float u, float v, struct xrt_uv_triplet *result)
Distortion correction implementation for the Vive, Vive Pro, Valve Index distortion values found in t...
Definition u_distortion_mesh.c:129
void u_compute_distortion_ns_meshgrid(struct u_ns_meshgrid_values *values, int view, float u, float v, struct xrt_uv_triplet *result)
Moshi Turner's North Star distortion correction implementation.
Definition u_distortion_mesh.c:329
void u_compute_distortion_panotools(struct u_panotools_values *values, float u, float v, struct xrt_uv_triplet *result)
Distortion correction implementation for Panotools distortion values.
Definition u_distortion_mesh.c:198
enum xrt_result xrt_result_t
Result type used across Monado.
Values to create a distortion mesh from cardboard values.
Definition u_distortion.h:87
Definition u_distortion_mesh.h:143
Definition u_distortion_mesh.h:120
Definition u_distortion_mesh.h:169
Definition u_distortion_mesh.h:182
int32_t y_offset
Hack values for WMR devices with weird distortions.
Definition u_distortion_mesh.h:192
struct xrt_vec2 tex_x_range
tan(angle) FoV min/max for X and Y in the input texture
Definition u_distortion_mesh.h:188
struct xrt_matrix_3x3 inv_affine_xform
Inverse affine transform to move from (undistorted) pixels to image plane / normalised image coordina...
Definition u_distortion_mesh.h:185
Definition u_distortion_mesh.h:242
float chromatic_abberation[4]
Color fringing correction.
Definition u_distortion_mesh.h:252
float eye_relief_m
Distance from the lens surface.
Definition u_distortion_mesh.h:244
float max_r
The tan-angle radius the last entry of k corresponds to.
Definition u_distortion_mesh.h:254
const float * k
The catmull-rom coeffecients.
Definition u_distortion_mesh.h:247
int k_count
The amount of coeffecients in use.
Definition u_distortion_mesh.h:249
float meters_per_tan_angle
How many metres across the panel one unit of tan-gent covers, measured at the centre of the lens.
Definition u_distortion_mesh.h:256
Definition u_distortion_mesh.h:223
float eye_gap_m
The gap in meters between the two viewports. Zero in all real hardware.
Definition u_distortion_mesh.h:227
float lens_center_from_panel_top
The distance from the top of the panel to lens centers, in meters.
Definition u_distortion_mesh.h:235
float lens_center_separation_m
The distance between the lens centers, in meters.
Definition u_distortion_mesh.h:233
float lens_diameter_m
The diameter of the lens.
Definition u_distortion_mesh.h:238
struct xrt_vec2 size_m
Size of the display, in meters.
Definition u_distortion_mesh.h:225
struct xrt_vec2 size_px
Size of the display, in pixels.
Definition u_distortion_mesh.h:230
Values to create a distortion mesh from Vive configuration values.
Definition u_distortion_mesh.h:70
float coefficients[3][4]
r/g/b, a/b/c/d
Definition u_distortion_mesh.h:82
struct xrt_vec2 center[3]
r/g/b
Definition u_distortion_mesh.h:79
A single HMD or input device.
Definition xrt_device.h:357
Describes a projection matrix fov.
Definition xrt_defines.h:533
A tightly packed 3x3 matrix of floats.
Definition xrt_defines.h:580
Represents a uv triplet for distortion, basically just three xrt_vec2.
Definition xrt_defines.h:300
A 2 element vector with 32 bit integers.
Definition xrt_defines.h:383
A 2 element vector with single floats.
Definition xrt_defines.h:279
Code to handle distortion parameters and fov.
void u_compute_distortion_rift(const struct u_rift_panel *panel, const struct u_rift_eye_profile *profile, uint32_t view, float u, float v, struct xrt_uv_triplet *result)
Oculus Rift distortion implementation.
Definition u_distortion_mesh_rift.c:315
Common defines and enums for XRT.
Header defining an xrt display or controller device.