Shape from shading with multiple light sources is an active research area, and a diverse range of approaches have been proposed in recent decades. However, devising a robust reconstruction technique still remains a challenging goal, as the image acquisition process is highly nonlinear. Recent Photometric Stereo variants rely on simplifying assumptions in order to make the problem solvable: light propagation is still commonly assumed to be uniform, and the Bidirectional Reflectance Distribution Function is assumed to be diffuse, with limited interest for specular materials. In this work, we introduce a well-posed formulation based on partial differential equations (PDEs) for a unified reflectance function that can model both diffuse and specular reflections. We base our derivation on ratio of images, which makes the model independent from photometric invariants and yields a well-posed differential problem based on a system of quasi-linear PDEs with discontinuous coefficients. In addition, we directly solve a differential problem for the unknown depth, thus avoiding the intermediate step of approximating the normal field. A variational approach is presented ensuring robustness to noise and outliers (such as black shadows), and this is confirmed with a wide range of experiments on both synthetic and real data, where we compare favorably to the state of the art.Reflectance. Most of the research done till now for the PS technique has assumed purely diffuse reflectance as the Bidirectional Reflectance Distribution Function (BRDF). Unlike (a) and (b), shape recovery from specular shading still remains a challenging goal since most of the common materials provide specular highlights that prevent reasonable reconstructions by the PS technique.Regarding shading models for specular highlights, several dedicated irradiance equations have been presented so far. First, Torrance and Sparrow [56] presented a physical model based on radiometry principles. Later, Phong [48] showed an empirical model which basically extended the cosine law, making it depend also on the viewer direction. The Blinn-Phong shading model [4] extended further the previous one by eliminating some limitation in the analytical formulation. Then Cook and Torrance [14] provided a well-known specular model based on a strongly nonlinear physical theory. Other important models for specular BRDFs can be found in [33], and interesting comparisons among some of them have been performed in [44].Instead of simplifying the PS problem by removing specularity, other works dealt with the images as they are, having both specular and diffuse components. Nayar, Ikeuchi, and Kanade [43] assumed hybrid surfaces by summing diffuse and specular components using the Beckmann and Spizzichino [3] reflection model, allowing them to locally reconstruct the shape of the object. Ikeuchi [28] faced the PS problem with specular reflectance by introducing a smoothness prior on the surface, which was shown to be realistic for several industrial applications, though this approach is limite...