Diffraction is an optical effect which limits the total resolution of a camera — no matter how many megapixels the camera sensor has. It happens because light begins to disperse or “diffract” when passing through the small opening that is the lens aperture. The smaller the aperture the greater the diffraction.