From af7ffc9c72e30ae377476f76a51a6676dd6e89aa Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 16 Nov 2014 20:06:14 +0200 Subject: [PATCH] Fix orthographic projection matrix calculation I made some last minute changes for c90cc1f and this got missed. --- source/camera.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/camera.cpp b/source/camera.cpp index 6cbcf6f4..d119e1ef 100644 --- a/source/camera.cpp +++ b/source/camera.cpp @@ -105,7 +105,7 @@ void Camera::apply() const void Camera::update_projection_matrix() { - float frustum_h = tan(fov/2.0f)*clip_near; + float frustum_h = (fov!=Geometry::Angle::zero() ? tan(fov/2.0f)*clip_near : height/2); float frustum_w = frustum_h*aspect; float left = frustum_w*(frustum_x-1.0f); float right = frustum_w*(frustum_x+1.0f); -- 2.43.0