It can be both art and programming! Here's a paper showing how programmers work with artists to develop the classic TF2 half lambert [0]. This shader also makes use of an efficient method for representing diffuse environmental contributions using low order contributions on a spherical harmonic basis which is similar to techniques from quantum mechanics [1].
[0] https://steamcdn-a.akamaihd.net/apps/valve/2007/NPAR07_Illus...