glm::mat4 getOrthographic() { const ovrEyeRenderDesc & erd = getEyeRenderDesc(); ovrMatrix4f ovrPerspectiveProjection = ovrMatrix4f_Projection(erd.Fov, 0.01f, 100000.0f, true); ovrVector2f scale; scale.x = scaleFactor; scale.y = scaleFactor; return ovr::toGlm(ovrMatrix4f_OrthoSubProjection(ovrPerspectiveProjection, scale, 100.8f, erd.HmdToEyeViewOffset.x)); }
glm::mat4 getOrthographic() { const ovrEyeRenderDesc & erd = getEyeRenderDesc(); ovrMatrix4f ovrPerspectiveProjection = ovrMatrix4f_Projection(erd.Fov, 0.01f, 100000.0f, true); ovrVector2f scale; scale.x = scaleFactor; scale.y = scaleFactor; return Rift::fromOvr(ovrMatrix4f_OrthoSubProjection(ovrPerspectiveProjection, scale, 100.8f, erd.ViewAdjust.x)); }