From becb27994feaaaf6c72938dbb7075c7c8cc4aa67 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 3 Oct 2023 15:12:44 +0100 Subject: [PATCH] Fixed vsg::orthogaphic(..) depth range --- include/vsg/maths/transform.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/vsg/maths/transform.h b/include/vsg/maths/transform.h index 9e5fe03d8..7ff43baee 100644 --- a/include/vsg/maths/transform.h +++ b/include/vsg/maths/transform.h @@ -156,7 +156,7 @@ namespace vsg return t_mat4(2.0 / (right - left), 0.0, 0.0, 0.0, 0.0, 2.0 / (bottom - top), 0.0, 0.0, 0.0, 0.0, 1.0 / (zFar - zNear), 0.0, - -(right + left) / (right - left), -(bottom + top) / (bottom - top), zFar / (zFar - zNear), 1.0); + -(right + left) / (right - left), -(bottom + top) / (bottom - top), 0.5 - (zNear+zFar) / (2.0*(zFar - zNear)), 1.0); } template