code: public Matrix4d unprojectInvRay(double winX, double winY, int[] viewport, Vector3d originDest, Vector3d dirDest) {
          double ndcX = (winX-viewport[0])/viewport[2]*2.0-1.0;
          double ndcY = (winY-viewport[1])/viewport[3]*2.0-1.0;
          double px = m00 * ndcX + m10 * ndcY + m30;
          double py = m01 * ndcX + m11 * ndcY + m31;
          double pz = m02 * ndcX + m12 * ndcY + m32;
          double invNearW = 1.0 / (m03 * ndcX + m13 * ndcY - m23 + m33);
          double nearX = (px - m20) * invNearW;
          double nearY = (py - m21) * invNearW;
          double nearZ = (pz - m22) * invNearW;
          double invFarW = 1.0 / (m03 * ndcX + m13 * ndcY + m23 + m33);
          double farX = (px + m20) * invFarW;
          double farY = (py + m21) * invFarW;
          double farZ = (pz + m22) * invFarW;
          originDest.x = nearX; originDest.y = nearY; originDest.z = nearZ;
          dirDest.x = farX - nearX; dirDest.y = farY - nearY; dirDest.z = farZ - nearZ;
          return this;
      }
docs: /* (non-Javadoc)
  @see org.joml.Matrix4dc#unprojectInvRay(double, double, int[], org.joml.Vector3d, org.joml.Vector3d)