Closed reverse-solidus closed 4 years ago
Matrix4f.mulPerspectiveAffine(Matrix4fc view, Matrix4f dest) does not work with the same matrix for both view and dest.
Matrix4f.mulPerspectiveAffine(Matrix4fc view, Matrix4f dest)
view
dest
Compare to mul0():
mul0()
Matrix4f t = new Matrix4f(); Matrix4f p = new Matrix4f().perspective(60.0f * (float)Math.PI / 180.0f, 4.0f/3.0f, 0.1f, 1000.0f); Matrix4f result1 = new Matrix4f(); Matrix4f result2 = new Matrix4f(); t.invertAffine(result1); p.mul(result1, result1); t.invertAffine(result2); p.mul0(result2, result2); System.out.println(result1.equals(result2, 1.0e-4f)); System.out.println(result1); System.out.println(result2);
Thanks for the report! Fixed with https://github.com/JOML-CI/JOML/commit/3275f4f2d15979bdfc1bb7ee17fce304356281ff . 1.9.26-SNAPSHOT build is in progress.
Matrix4f.mulPerspectiveAffine(Matrix4fc view, Matrix4f dest)
does not work with the same matrix for bothview
anddest
.Compare to
mul0()
: