The influence of surface roughness on angle-resolved photoelectron intensities has been studied by means of a semiempirical method and experimentally. The full three-dimensional information about the surface roughness of real samples measured by atomic force microscopy (AFM) was used as an input for the calculations of the so-called tilt-angle histograms. Both effects of surface roughness, shadowing of photoelectrons and differences between microscopic and macroscopic signal electron emission geometry (true emission angles), are taken into account. Photoelectron current is then calculated using a common formalism XPS/AES valid for ideally flat surfaces, i.e. analytically by the straight-line approximation (SLA) or by Monte Carlo calculations. The approach which can be applied for an arbitrary type of surface roughness is verified on angular-resolved Si 2p photoelectron spectra recorded from model silicon samples with different artificially modified surface roughness, covered by a thin silicon oxide film and a surface contamination. The effect of surface roughness on the Si 2p photoelectron intensities was found to be quite prevalent over electron elastic scattering or surface contamination effects. The so-called magic angle depended on a character of surface roughness.