Content deleted Content added
The vector being reflected should be subtracted from, not the other way around. |
|||
Line 37:
where the direction vector <math>\hat{R}_m</math> is calculated as the [[Specular reflection#Direction of reflection|reflection]] of <math>\hat{L}_m</math> on the surface characterized by the surface normal <math>\hat{N}</math> using
:<math>\hat{R}_m =
and the hats indicate that the vectors are [[Unit vector|normalized]]. The diffuse term is not affected by the viewer direction (<math>\hat{V}</math>). The specular term is large only when the viewer direction (<math>\hat{V}</math>) is aligned with the reflection direction <math>\hat{R}_m</math>. Their alignment is measured by the <math>\alpha</math> power of the cosine of the angle between them. The cosine of the angle between the normalized vectors <math>\hat{R}_m</math> and <math>\hat{V}</math> is equal to their [[dot product]]. When <math>\alpha</math> is large, in the case of a nearly mirror-like reflection, the specular highlight will be small, because any viewpoint not aligned with the reflection will have a cosine less than one which rapidly approaches zero when raised to a high power.
|