Explaining BRDF, Lambertian vs Cook-Torrance, and Fresnel effect
The BRDF (Bidirectional Reflectance Distribution Function) defines how light reflects at a surface, relating incoming light direction to outgoing reflection. It’s fundamental in ray tracing, used in the rendering equation to compute outgoing radiance by integrating the BRDF over incoming light directions.
The Lambertian BRDF models perfectly diffuse surfaces, reflecting light equally in all directions with a constant value of albedo divided by π, following Lambert’s cosine law. It ignores view dependence and Fresnel effects.
In contrast, the Cook-Torrance BRDF is a physically-based microfacet model representing specular reflection from rough surfaces. It combines three terms: the normal distribution function (D), geometry shadowing (G), and Fresnel term (F), and is given by (D × F × G) / [4 (n·l)(n·v)], where n, l, and v are surface normal, light, and view directions respectively. This model captures view-dependent highlights and energy conservation.
The Fresnel term describes how reflectance changes with incident angle and material properties. At normal incidence, reflectance is low; it increases toward 1 at grazing angles, causing surfaces like water or glass to appear more reflective when viewed edge-on. Schlick’s approximation expresses Fresnel reflectance as F = F₀ + (1 − F₀)(1 − cos θ)⁵, where F₀ depends on the material. This effect intensifies specular highlights at glancing angles and distinguishes metals (higher F₀) from dielectrics (lower F₀).
While Lambertian ignores Fresnel effects, physically accurate models like Cook-Torrance incorporate them to simulate realistic reflections varying with view angle.
In a physically‑based renderer you are ultimately trying to evaluate the rendering equation, which relates the radiance leaving a point in a given direction ( \omega_o ) to the incoming radiance from all directions ( \omega_i ):
[
L_o(\omega_o) ;=; \int_{\Omega} f_r(\omega_i,\omega_o),L_i(\omega_i),(\mathbf{n}\cdot\omega_i),\mathrm{d}\omega_i,
]
where (f_r) is the bidirectional reflectance distribution function (BRDF). By definition, the BRDF gives you the ratio of differential reflected radiance in a direction ( \omega_o ) to differential incident irradiance from ( \omega_i ). It encodes how the material scatters light depending on both the incident and viewing directions, and it is designed to obey physical constraints such as energy conservation and reciprocity.
Two common BRDF models span the spectrum from simple to more sophisticated:
- A Lambertian diffuse BRDF assumes the surface is a perfect matte scatterer. Incoming light is scattered uniformly into the hemisphere above the surface, so the BRDF is constant:
[
f_r^{\text{Lambert}} = \frac{\rho}{\pi},
]
where (\rho) is the diffuse reflectance, or albedo. Because it's constant, the only angular dependence in the reflected radiance comes from the cosine term ((\mathbf{n}\cdot\omega_i)) in the rendering equation (Lambert’s cosine law). There is no dependence on the outgoing/view direction.
- The Cook–Torrance BRDF is a microfacet model for specular/glossy reflection. It treats the surface as a statistical distribution of tiny mirror‑like facets. Each facet reflects light according to Fresnel’s law, and only facets oriented around the half‑vector contribute. The model is usually written as
[
f_r^{\text{Cook–Torrance}} = \frac{D(h),F(\omega_o,h),G(\omega_i,\omega_o)}{4,(\mathbf{n}\cdot\omega_i),(\mathbf{n}\cdot\omega_o)}.
]
Here (D) is the normal distribution function describing the facet slope distribution (and thus the lobe width/roughness), (G) is the geometry (shadowing–masking) term that accounts for self‑occlusion between facets, and (F) is the Fresnel term. Unlike Lambertian, this BRDF varies with both incident and outgoing directions and can produce sharp or broad highlights depending on roughness while still satisfying energy conservation if properly parameterised.
The Fresnel term (F) comes directly from electromagnetic theory: it tells you what fraction of light is reflected versus transmitted at a dielectric interface as a function of the incident angle and the refractive indices. For unpolarised light it can be computed from the Fresnel equations, or in shaders often approximated by Schlick’s formula
[
F(\cos\theta) \approx F_0 + (1-F_0),(1-\cos\theta)^5,
]
where (\theta) is the angle between the view direction and the half‑vector and (F_0) is the reflectance at normal incidence (e.g. about 0.04 for many dielectrics, much higher for metals). A key consequence is that even a “non‑shiny” dielectric reflects more light at grazing angles: (F) approaches 1 as (\theta) approaches 90°, so glancing views show strong specular reflection, while at normal incidence the reflection is weaker. Incorporating Fresnel into a BRDF such as Cook–Torrance produces the characteristic increase in reflectivity towards the edges of objects that we see in the real world.