Direct integration of the S-matrix applied to rigorous diffraction