|
Monado OpenXR Runtime
|
Rift-style lens distortion, as used by the Oculus Rift DK2 and CV1. More...

Data Structures | |
| struct | u_rift_distortion_render_info |
| struct | u_rift_distortion_tan_fov |
| struct | u_rift_distortion_scale_offset |
Functions | |
| static struct xrt_vec2 | to_tan_angle (const struct u_rift_distortion_render_info *info, struct xrt_vec2 ndc) |
| Computes the tan angle of a NDC point, as seen from the eye. | |
| static float | value_at (const float *k, int j) |
| Value of the curve at knot j. | |
| static float | slope_after (const float *k, int n, int j) |
| Slope the curve leaves knot j with. | |
| static float | slope_before (const float *k, int n, int j) |
| Slope the curve arrives at knot j with. | |
| static float | hermite (float p0, float m0, float p1, float m1, float t) |
| Standard cubic Hermite: value p0 with slope m0 at t=0, value p1 with slope m1 at t=1. | |
| static float | curve (const float *k, int n, float s) |
| Magnification at curve position s. | |
| static float | magnification (const struct u_rift_eye_profile *profile, float rho) |
| The magnification for a squared tan-angle radius. | |
| static struct u_rift_distortion_render_info | compute_render_info (const struct u_rift_panel *panel, const struct u_rift_eye_profile *profile, uint32_t view) |
| static struct u_rift_distortion_tan_fov | fov_from_eye (float lens_diameter, float eye_relief, float rot_rad) |
| Computes the tangent FOV for an eye from the given parameters. | |
| static float | physical_fov_sweep (const struct u_rift_distortion_render_info *info, const struct u_rift_eye_profile *profile, const struct xrt_vec2 edge, int axis, float sign) |
Walk from the lens centre to edge, and return how far the view reaches in one direction. | |
| static struct u_rift_distortion_tan_fov | physical_fov (const struct u_rift_distortion_render_info *info, const struct u_rift_eye_profile *profile) |
| static struct u_rift_distortion_tan_fov | fov (const struct u_rift_panel *panel, const struct u_rift_eye_profile *profile, const struct u_rift_distortion_render_info *info) |
| static struct u_rift_distortion_scale_offset | ndc_mapping (const struct u_rift_distortion_tan_fov *fov) |
| static struct u_rift_distortion_scale_offset | uv_mapping (const struct u_rift_distortion_scale_offset ndc) |
| static void | colour_fringing_scales (const struct u_rift_eye_profile *profile, float rho, float *scales) |
| 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. | |
Rift-style lens distortion, as used by the Oculus Rift DK2 and CV1.
|
static |
Magnification at curve position s.
References CLAMP, hermite(), slope_after(), slope_before(), and value_at().
|
static |
Computes the tangent FOV for an eye from the given parameters.
| lens_diameter | The diameter of the lens. |
| eye_relief | The eye relief of the lens. |
| rot_rad | The rotation of the eye, in radians. Max 30 degrees. |
References CLAMP, DEG_TO_RAD, and MAX.
|
static |
Standard cubic Hermite: value p0 with slope m0 at t=0, value p1 with slope m1 at t=1.
Any equivalent arrangement of these terms will do.
Referenced by curve().
|
static |
The magnification for a squared tan-angle radius.
References u_rift_eye_profile::k, u_rift_eye_profile::k_count, and u_rift_eye_profile::max_r.
Referenced by physical_fov_sweep().
|
static |
Walk from the lens centre to edge, and return how far the view reaches in one direction.
axis picks x or y; sign is -1 for the left and up directions, which run towards negative tan-angle.
References magnification(), MAX, and to_tan_angle().
|
static |
Slope the curve leaves knot j with.
Referenced by curve(), and slope_before().
|
static |
Slope the curve arrives at knot j with.
Same as slopeAfter everywhere except knot n-2; see section 5.3.
References slope_after().
Referenced by curve().
|
inlinestatic |
Computes the tan angle of a NDC point, as seen from the eye.
Referenced by physical_fov_sweep(), and u_compute_distortion_rift().
| 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.
References u_rift_eye_profile::k_count, and to_tan_angle().
|
static |
Value of the curve at knot j.
Referenced by curve().