lumos.brdf.library.PHONG

lumos.brdf.library.PHONG(Kd, Ks, n)[source]

Phong scattering model.

\(BRDF = \frac{K_d}{\pi} + K_s\frac{n + 2}{2 \pi} (\hat{w}_r \cdot \hat{w}_o)^n\)

Parameters:
  • Kd (float) – Diffuse coefficient. Ensure \(Kd + Ks \leq 1\)

  • Ks (float) – Specular coefficient. Ensure \(Kd + Ks \leq 1\)

  • n (float) – Controls width of specular peak.

Returns:

BRDF function, where f = BRDF(incident vector, normal_vector, outgoing_vector)

Return type:

function