Oren Nayar got me more interested in physically based shaders. In the simplest sense, they are shaders that approach lighting from a Physics rather than mathematical perspective. Oren Nayar does this by adding a roughness attribute that attempts to simulate the effects of microscopic bumps on light reflection. While these bumps would be smaller than a pixel, their effect is quite noticeable in terms of overall light contribution, and so they are worth taking into account.Strauss is another shading technique that is physically based. I based my implementation on this post. The interesting thing about Strauss is that it only uses 3 attributes to calculate diffuse and specular light: how smooth the surface is , how metallic it is, and how transparent it is. This greatly simplifies the material setup and makes the lighting more consistent than phong, producing a wider range of materials and generally producing more realistic results.
Consider the following scenario, with Strauss on the left and Phong on the right. As you can see the light is causing the phong to blow out in areas, and is generally more plastic in appearance.
While we could adjust the Phong to work better, this might cause it to look worse in another lighting situation. For example, a common hack would be to tint the diffuse with a darker color, say 50% grey. This would keep your highlights from blowing out but it would also make your shadows twice as dark. This leads to more hacks and tweaks, which eventually means that all the materials are carefully tweaked to work for certain scenarios, but perform worse in others. Instead, by taking a few more things into account in the shader, we can get more consistent results with less work – always a good thing.1 thing to note is that i haven’t figured out what to do with my spec map yet. It seems rather silly to use for this shader but i haven’t got a better solution just yet so it stays as it is for now. It will probably become either a metallic or roughness map in the future once i learn a bit more about physically based rendering, but i’m not sure what makes the most sense yet.