Skip to content

Commit

Permalink
fix(matrix4): Fix ortho projection error (Orillusion#249)
Browse files Browse the repository at this point in the history
Fix projection error in ortho & orthoOffCenter
  • Loading branch information
jiangheng90 authored Jul 27, 2023
1 parent 1b30982 commit 8b7b42d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/math/Matrix4.ts
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ export class Matrix4 {

data[12] = 0;
data[13] = 0;
data[14] = zn / (zn - zf);
data[14] = (zn + zf) / (zn - zf);
data[15] = 1;

return this
Expand Down Expand Up @@ -711,7 +711,7 @@ export class Matrix4 {

data[12] = (l + r) / (l - r);
data[13] = (t + b) / (b - t);
data[14] = zn / (zn - zf);
data[14] = (zn + zf) / (zn - zf);
data[15] = 1;
}

Expand Down

0 comments on commit 8b7b42d

Please sign in to comment.