Phong reflection model: Difference between revisions

Content deleted Content added
Monkbot (talk | contribs)
m Task 18 (cosmetic): eval 3 templates: del empty params (1×); hyphenate params (1×);
m Un-sourced claims require citations
Line 58:
This approximation of the specular term holds for a sufficiently large, integer <math>\gamma</math> (typically, 4 or 8 will be enough).
 
Furthermore, the value <math>\lambda</math> can be approximated as <math>\lambda = (\hat{R}_m - \hat{V})\cdot(\hat{R}_m - \hat{V}) / 2</math>, or as <math>\lambda = (\hat{R}_m \times \hat{V})\cdot(\hat{R}_m \times \hat{V}) / 2.</math> The latter is much less sensitive to normalization errors in <math>\hat{R}_m</math> and <math>\hat{V}</math> than Phong's dot-product-based <math>\lambda = 1 - \hat{R}_m \cdot \hat{V}</math> is{{Citation needed|reason=Lyon-1993 does not reference this anywhere|date=April 2022}}, and practically doesn't require <math>\hat{R}_m</math> and <math>\hat{V}</math> to be normalized{{Citation needed|reason=Lyon-1993 does not reference this anywhere|date=April 2022}} except for very low-resolved triangle meshes.
 
This method substitutes a few multiplications for a variable exponentiation, and removes the need for an accurate reciprocal-square-root-based vector normalization.