Blinn–Phong shading model
From Wikipedia, the free encyclopedia
The Blinn-Phong shading model (also called Blinn-Phong reflection model or modified Phong reflection model) is a modification to the Phong reflection model, trading visual precision for computing efficiency.
In Phong shading, one must continually recalculate the angle between a viewer (V) and the beam from a light-source (L) reflected (R) on a surface.
If we instead calculate a halfway vector between the viewer and light-source vectors,
we can replace with .
This dot product represents the cosine of an angle that is half of the angle represented by Phong's dot product, if V, L, N and R all lie in the same plane. The angle between N and H is therefore sometimes called the halfway angle.
The halfway angle is smaller than the angle we want in Phong's model, but considering that Phong is using , we can set an exponent so that is closer to the former expression. The size of the specular highlights can be matched in this way very closely to a corresponding Phong reflection, but they will always retain a subtly different shape.
Additionally, while it can be seen as an approximation to the Phong model, it produces more accurate models of empirically determined bidirectional reflectance distribution functions than Phong for many types of surfaces. (See: Experimental Validation of Analytical BRDF Models, Siggraph 2004)
Blinn-Phong is the default shading model used in OpenGL, and is carried out on each vertex as it passes down the graphics pipeline; pixel values between vertices are interpolated by Gouraud shading by default, rather than the more expensive Phong shading.
[edit] See also
- Phong reflection model for Phong's corresponding model
- Phong shading
- Gouraud shading
- Specular highlight