Creating a Blinn-Phong Specular type
Blinn is another more efficient way of calculating and estimating specularity. It is done by getting the half vector from the view direction and the light direction. It was brought into the world of Cg by Jim Blinn. Blinn found that it was far more efficient to simply get the half vector instead of calculating our own reflection vectors. This cut down on the code and processing time. If you actually look at the built-in Blinn-Phong lighting model included in the UnityCG.cginc
file, you will notice that it is using the half vector as well; hence, it is named Blinn-Phong. It is just a simpler version of the full Phong calculation.
Getting ready
To begin, perform the following steps:
- This time, instead of creating a whole new Scene, let's just use the objects and scene that we already have by navigating to File | Save Scene As.... Then, create a new shader (
Blinn-Phong
) and material (BlinnPhongMat
):