Context. High-contrast scattered light observations have revealed the surface morphology of several dozen protoplanetary disks at optical and near-infrared wavelengths. Inclined disks offer the opportunity to measure part of the phase function of the dust grains that reside in the disk surface which is essential for our understanding of protoplanetary dust properties and the early stages of planet formation. Aims: We aim to construct a method which takes into account how the flaring shape of the scattering surface of an optically thick protoplanetary disk projects onto the image plane of the observer. This allows us to map physical quantities (e.g., scattering radius and scattering angle) onto scattered light images and retrieve stellar irradiation corrected images (r2-scaled) and dust phase functions. Methods: The scattered light mapping method projects a power law shaped disk surface onto the detector plane after which the observed scattered light image is interpolated backward onto the disk surface. We apply the method on archival polarized intensity images of the protoplanetary disk around HD 100546 that were obtained with VLT/SPHERE in the R' band and VLT/NACO in the H and Ks bands. Results: The brightest side of the r2-scaled R' band polarized intensity image of HD 100546 changes from the far to the near side of the disk when a flaring instead of a geometrically flat disk surface is used for the r2-scaling. The decrease in polarized surface brightness in the scattering angle range of 40°-70° is likely a result of the dust phase function and degree of polarization which peak in different scattering angle regimes. The derived phase functions show part of a forward scattering peak, which indicates that large, aggregate dust grains dominate the scattering opacity in the disk surface. Conclusions: Projection effects of a protoplanetary disk surface need to be taken into account to correctly interpret scattered light images. Applying the correct scaling for the correction of stellar irradiation is crucial for the interpretation of the images and the derivation of the dust properties in the disk surface layer.