From ba8656044f654d293d5715c0de474ed3e7d94146 Mon Sep 17 00:00:00 2001 From: fincs Date: Wed, 20 Jan 2016 16:06:46 +0100 Subject: [PATCH] Fix Mtx_OrthoTilt: near/far were swapped --- source/maths/mtx_orthotilt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/maths/mtx_orthotilt.c b/source/maths/mtx_orthotilt.c index 635c3d9..f1c807d 100644 --- a/source/maths/mtx_orthotilt.c +++ b/source/maths/mtx_orthotilt.c @@ -10,8 +10,8 @@ void Mtx_OrthoTilt(C3D_Mtx* mtx, float left, float right, float bottom, float to mp.r[0].w = (left + right) / (left - right); mp.r[1].y = 2.0f / (top - bottom); mp.r[1].w = (bottom + top) / (bottom - top); - mp.r[2].z = 2.0f / (near - far); - mp.r[2].w = (far + near) / (far - near); + mp.r[2].z = 2.0f / (far - near); + mp.r[2].w = (near + far) / (near - far); mp.r[3].w = 1.0f; // Fix depth range to [-1, 0]