I decided to test out Cook-Torrance in place of normalized Blinn-Phong, and while it's not difficult to implement, it's difficult to know if I'm doing it right, mostly because there is some variation depending on what sources you look at. For instance, I've seen three versions for the Cook-Torrance equation:
[attachment=13494:eqn1.png]
I saw PI in the denominator in Cook's paper, I believe I saw nothing in the version in a publication by Wolfgang Engel and in gpwiki.org's D3DBook (probably copied), and on wikipedia there apears a 4, as well as on a video I saw from UC Davis.
Then there is the NDF:
[attachment=13495:eqn2.png]
This is how it apeared in Cook's paper, but I've also seen:
[attachment=13496:eqn3.png]
Someplace I saw that PI was a normilization factor. I'm not sure if this is correct, and if it is why it was not present in Cook's paper or other papers for that matter. I want to be sure that everything is normalized and energy conserving.
Maybe as one last question, I'd like to know the propper way for ensuring that there is energy concervation between specular and diffuse.