Fix swapped near/far in Mtx_Ortho(Tilt)

This commit is contained in:
fincs 2016-08-04 12:11:56 +02:00
parent 766def30a3
commit 8481109e15
2 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ void Mtx_Ortho(C3D_Mtx* mtx, float left, float right, float bottom, float top, f
mtx->r[0].w = (left + right) / (left - right);
mtx->r[1].y = 2.0f / (top - bottom);
mtx->r[1].w = (bottom + top) / (bottom - top);
mtx->r[2].z = 1.0f / (near - far);
mtx->r[2].z = 1.0f / (far - near);
mtx->r[2].w = 0.5f*(near + far) / (near - far) - 0.5f;
mtx->r[3].w = 1.0f;
}

View File

@ -12,7 +12,7 @@ void Mtx_OrthoTilt(C3D_Mtx* mtx, float left, float right, float bottom, float to
mtx->r[0].w = (bottom + top) / (bottom - top);
mtx->r[1].x = 2.0f / (left - right);
mtx->r[1].w = (left + right) / (right - left);
mtx->r[2].z = 1.0f / (near - far);
mtx->r[2].w = 0.5f*(far + near) / (near - far) - 0.5f;
mtx->r[2].z = 1.0f / (far - near);
mtx->r[2].w = 0.5f*(near + far) / (near - far) - 0.5f;
mtx->r[3].w = 1.0f;
}