Back out state.offset change in oculus

This makes rendering work correctly again, but now most likely state.offset does not work right.
This commit is contained in:
mcc 2019-02-08 15:00:50 -05:00
parent b471231663
commit 41e621d006
1 changed files with 1 additions and 1 deletions

View File

@ -375,7 +375,7 @@ static void oculusRenderTo(void (*callback)(void*), void* userdata) {
mat4_identity(transform);
mat4_rotateQuat(transform, orient);
transform[12] = -(transform[0] * pos[0] + transform[4] * pos[1] + transform[8] * pos[2]);
transform[13] = -(transform[1] * pos[0] + transform[5] * pos[1] + transform[9] * pos[2] + state.offset);
transform[13] = -(transform[1] * pos[0] + transform[5] * pos[1] + transform[9] * pos[2]);
transform[14] = -(transform[2] * pos[0] + transform[6] * pos[1] + transform[10] * pos[2]);
ovrMatrix4f projection = ovrMatrix4f_Projection(desc.DefaultEyeFov[eye], state.clipNear, state.clipFar, ovrProjection_ClipRangeOpenGL);