Physically-inspired Shader

This shader borrows heavily from physically-based shader techniques. The idea behind physically based shading is that your lighting model should not emit more light than it receives. With a few parameters, physically-based shaders can realistically replicate a wide variety of real-life materials. This shader has controllable Diffuse Color, Specular Color, Specular Power, and Roughness (inverted, smaller = more rough). With less specular power, specular highlights and reflections diffuse out, getting larger and blurrier (rougher surfaces also decrease specular power). With higher specular power, specular highlights get smaller and more focused, and reflections look sharper. Specular Color is used for metallics (in general, set the Diffuse color to black, set the Specular color to the color of the metal, and play with the specular power and roughness) This shader does need a cubemap, otherwise it looks washed out. Rough materials will look best on DX11, which fixes up cubemap edges when sampling cubemap mip levels. Cubemap reflections are not visible on mobile (I suppose mobile cannot use texCUBElod).