The picture of Bragg's Law and that simple planar molecule in the Introduction certainly oversimplifies the situation: in general, the electron densities in the unit cell are not concentrated in parallel planes. A more realistic depiction would have atoms dispersed at various locations in between those planes:

in which the resultant reflection recorded on the detector is the sum of all the individual atom diffractions. Upper case “Fhkl” is the resultant structure factor (the detector records the Intensity of the diffraction, which is proportional to F2); the lower case “fj” is the scattering power of atom j in units of electrons. The exponential expression is the phase angle of the individual atom diffraction. This expression can be looked on as a correction to the phase angle necessitated by the atom being “out of” the Bragg plane (if atom j were in the top plane, the phase angle would be 0° ; if it were in the bottom plane, the phase angle would be 360°). The quantities xj, yj, zj are the atom fractional coordinates along the a, b and c unit cell axes, respectively.