Fix swapped near/far in Mtx_Ortho(Tilt)
This commit is contained in:
parent
766def30a3
commit
8481109e15
@ -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[0].w = (left + right) / (left - right);
|
||||||
mtx->r[1].y = 2.0f / (top - bottom);
|
mtx->r[1].y = 2.0f / (top - bottom);
|
||||||
mtx->r[1].w = (bottom + top) / (bottom - top);
|
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[2].w = 0.5f*(near + far) / (near - far) - 0.5f;
|
||||||
mtx->r[3].w = 1.0f;
|
mtx->r[3].w = 1.0f;
|
||||||
}
|
}
|
||||||
|
@ -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[0].w = (bottom + top) / (bottom - top);
|
||||||
mtx->r[1].x = 2.0f / (left - right);
|
mtx->r[1].x = 2.0f / (left - right);
|
||||||
mtx->r[1].w = (left + right) / (right - left);
|
mtx->r[1].w = (left + right) / (right - left);
|
||||||
mtx->r[2].z = 1.0f / (near - far);
|
mtx->r[2].z = 1.0f / (far - near);
|
||||||
mtx->r[2].w = 0.5f*(far + near) / (near - far) - 0.5f;
|
mtx->r[2].w = 0.5f*(near + far) / (near - far) - 0.5f;
|
||||||
mtx->r[3].w = 1.0f;
|
mtx->r[3].w = 1.0f;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user