Actually correct ortho

This commit is contained in:
bloeys
2021-11-15 09:53:43 +04:00
parent 585d17aa29
commit b39e8e0b80

View File

@ -136,7 +136,7 @@ func Ortho(left, right, top, bottom, nearClip, farClip float32) *TrMat {
Mat4: Mat4{
Data: [4][4]float32{
{2 / (right - left), 0, 0, 0},
{0, 2 / -(top - bottom), 0, 0},
{0, 2 / (top - bottom), 0, 0},
{0, 0, -2 / (farClip - nearClip), 0},
{-(right + left) / (right - left), -(top + bottom) / (top - bottom), -(farClip + nearClip) / (farClip - nearClip), 1},
},