mal, 0]);

        const minusOneDot = [];
        const reflect = eyeToSurfaceDir.map((incident, ndx) => {
          const normal = surfaceNormal[ndx];
          minusOneDot[ndx] = incident - dot * normal;
          return incident - 2 * dot * normal;
        });

        let gradNdx = 0;
        let sc = reflect[1];
        if (Math.abs(reflect[1]) > Math.abs(reflect[0])) {
          if (reflect[1] > 0) {
            gradNdx = 3;
            sc = -reflect[0];
          } else  {
            gradNdx = 1;
 