Blinn is another more efficient way of calculating and estimating specularity. It is done by getting the half vector from the view direction and light direction. It was brought into the world of Cg by Jim Blinn. He found that it was much more efficient to just get the half vector instead of calculating our own reflection vectors. It cut down on the code and processing time. If you actually look at the built-in BlinnPhong lighting model included in the UnityCG.cginc
file, you will notice that it is using the half vector as well, hence it is named BlinnPhong. It is just a simpler version of the full Phong calculation.
To start with this recipe, perform the following steps:
This time, instead of creating a whole new scene, let's just use the objects and scene that we have, and create a new shader and material and name them
BlinnPhong
.Once you have a new shader, double-click on it to launch MonoDevelop so that we can start editing our shader.