# Phong and the Rendering Equation: What's with the cosine?

Ignoring emission and shadowing for simplicity, the rendering equation can be stripped down to:

$$L(x, \, \vec \omega) = \int_{\Omega}{f_r(x, \, \vec \omega^\prime, \, \vec \omega) \, (\vec \omega^\prime \cdot \vec n) \, d\vec \omega^\prime}$$

where $f_r$ is the BRDF and $(\vec \omega^\prime \cdot \vec n)$ is the cosine of the angle between light and surface normal.

For the Lambertian diffuse BRDF $\frac{\rho}{\pi}$ this is fine - we're multiplying it with the cosine, seeing Lambert's cosine law in action.

Now for the specular part of the Phong BRDF, you would commonly calculate a pixel's color like this:

$$I_{out} = I_{in} \, k_{specular} \, (\vec w \cdot \vec r)^\alpha$$

where $I_{in}$ is the incident light, $k_{specular}$ is the specular reflectivity of the surface, and $\alpha$ is the Phong exponent. Note the absence of $(\vec \omega^\prime \cdot \vec n)$ in this equation.

To use the rendering equation and end up with the same pixel value as the common Phong equation above, we'd need to write:

$$f^{Phong}_r(x, \, \vec \omega^\prime, \, \vec \omega) = \frac{1}{(\vec \omega^\prime \cdot \vec n)} \, k_{specular} \, (\vec w \cdot \vec r)^\alpha$$

Note the cosine in the denominator that cancels out the cosine in $L(x, \, \vec \omega)$.

In his derivation of the Phong normalization factor, Fabian Giesen states:

[...] this is the derivation for the original Phong formulation, where the $R \cdot V$ term is not multiplied by $cos \theta$. If you write that version of the Phong model as a BRDF, you end up with a $cos \theta$ in the numerator to cancel out the $cos \theta$ factor in the reflection equation. This numerator is complete nonsense physically, so the modern formulation of the Phong model removes it.

I don't understand why he speaks about the numerator here, instead of the denominator. Is this a slip in the article, or a misunderstanding on my part?

What is the 'modern formulation' of Phong? What does it mean that cancelling out is 'complete nonsense physically'? With the normalization factor, $\frac{\alpha + X}{2 \pi}$ when should you use $X=1$ and when $X=2$?

Here is a path traced side-by-side comparison of a reflective sphere, Phong exponent 100, $X=2$ for the normalization. The left image has the cosine cancelled out, while the right image includes it, noticably darkening the borders.