Commit: abe2669720b060a7fdecb07a91aa28afc1d9ad21
Author: Julian Eisel
Date: Tue Mar 7 17:26:36 2017 +0100
Branches: HMD_viewport
https://developer.blender.org/rBabe2669720b060a7fdecb07a91aa28afc1d9ad21
Use projection matrix from OpenHMD even if "Rotation from HMD" is disabled
Was actually applying IPD wrongly, should be correct now.
===================================================================
M source/blender/editors/space_view3d/view3d_draw.c
===================================================================
diff --git a/source/blender/editors/space_view3d/view3d_draw.c
b/source/blender/editors/space_view3d/view3d_draw.c
index 0d808cc23e..a3f589e4a6 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -3697,14 +3697,12 @@ static void view3d_hmd_view_get_matrices(
}
else {
const float shiftx =
WM_device_HMD_lens_horizontal_separation_get();
- const float ipd = WM_device_HMD_IPD_get();
- copy_m4_m4(r_modelviewmat, rv3d->viewmat);
- copy_m4_m4(r_projectionmat, rv3d->winmat);
+ WM_device_HMD_projection_matrix_get(is_left, r_projectionmat);
+ copy_m4_m4(r_modelviewmat, rv3d->viewmat);
/* apply ipd and lens shift */
r_modelviewmat[3][0] += (shiftx * 0.5f) * (is_left ? 1.0f :
-1.0f);
- r_projectionmat[3][0] += (ipd * 0.5f) * (is_left ? 1.0f :
-1.0f);
}
}
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs