What are the two factors that affect the amount of diffraction?