Set distortion model when scale is known
This commit is contained in:
@@ -220,8 +220,8 @@ wivrn_hmd::wivrn_hmd(std::shared_ptr<xrt::drivers::wivrn::wivrn_session> cnx,
|
||||
hmd->view_count = 2;
|
||||
hmd->blend_modes[0] = XRT_BLEND_MODE_OPAQUE;
|
||||
hmd->blend_mode_count = 1;
|
||||
hmd->distortion.models = XRT_DISTORTION_MODEL_COMPUTE;
|
||||
hmd->distortion.preferred = XRT_DISTORTION_MODEL_COMPUTE;
|
||||
hmd->distortion.models = XRT_DISTORTION_MODEL_NONE;
|
||||
hmd->distortion.preferred = XRT_DISTORTION_MODEL_NONE;
|
||||
hmd->screens[0].w_pixels = eye_width * 2;
|
||||
hmd->screens[0].h_pixels = eye_height;
|
||||
hmd->screens[0].nominal_frame_interval_ns = 1000000000 / info.preferred_refresh_rate;
|
||||
@@ -239,6 +239,7 @@ wivrn_hmd::wivrn_hmd(std::shared_ptr<xrt::drivers::wivrn::wivrn_session> cnx,
|
||||
// FOV from headset info packet
|
||||
hmd->distortion.fov[0] = xrt_cast(info.fov[0]);
|
||||
hmd->distortion.fov[1] = xrt_cast(info.fov[1]);
|
||||
u_distortion_mesh_fill_in_compute(this);
|
||||
}
|
||||
|
||||
void wivrn_hmd::update_inputs()
|
||||
@@ -354,6 +355,8 @@ decltype(wivrn_hmd::foveation_parameters) wivrn_hmd::set_foveated_size(uint32_t
|
||||
|
||||
// Distortion information
|
||||
compute_distortion = wivrn_hmd_compute_distortion;
|
||||
hmd->distortion.models = XRT_DISTORTION_MODEL_COMPUTE;
|
||||
hmd->distortion.preferred = XRT_DISTORTION_MODEL_COMPUTE;
|
||||
u_distortion_mesh_fill_in_compute(this);
|
||||
return foveation_parameters;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user