How to apply scattering in the presence of total internal reflection (TIR)