# In a physically based BRDF, what vector should be used to compute the Fresnel coefficient?

The well known Schlick approximation of the Fresnel coefficient gives the equation:

$F=F_0+(1 - F_0)(1 - cos(\theta))^5$

And $cos(\theta)$ is equal to the dot product of the surface normal vector and the view vector.

It is still unclear to me though if we should use the actual surface normal $N$ or the half vector $H$. Which should be used in a physically based BRDF and why?

Moreover, as far as I understand the Fresnel coefficient gives the probability of a given ray to either get reflected or refracted. So I have trouble seeing why we can still use that formula in a BRDF, which is supposed to approximate the integral over all the hemisphere.

This observation would tend to make me think this is where $H$ would come, but it is not obvious to me that the Fresnel of a representative normal is equivalent to integrating the Fresnel of all the actual normals.

In Schlick's 1994 paper, "An Inexpensive Model for Physically-Based Rendering", where they derive the approximation, the formula is: $$F_{\lambda}(u) = f_{\lambda} + (1 - f_{\lambda})(1 - u)^{5}$$

Where

So, to answer your first question, $$\theta$$ refers to the angle between the view vector and the half vector. Consider for a minute that the surface is a perfect mirror. So: $$V \equiv reflect(V')$$ In this case: $$N \equiv H$$

For microfacet-base BRDFs, the $$D(h_{r})$$ term refers to the statistical percentage of microfacet normals that are oriented towards $$H$$. Aka, what percentage of the incoming light will bounce in the outgoing direction.

As for why we use Fresnel in a BRDF, it has to do with the fact that a BRDF by itself is only a portion of the full BSDF. A BRDF attenuates the reflected portion of light and a BTDF attenuates the refracted. We use the Fresnel to calculate the amount of reflected vs. refracted light, so we can properly attenuate it with the BRDF and BTDF.

$$BSDF = BRDF + BTDF\\$$ \begin{align*} L_{\text{o}}(p, \omega_{\text{o}}) &= L_{e}(p, \omega_{\text{o}}) \ + \ \int_{\Omega} BSDF * L_{\text{i}}(p, \omega_{\text{i}}) \left | \cos \theta_{\text{i}} \right | d\omega_{\text{i}} \\ &= L_{e}(p, \omega_{\text{o}}) \ + \ \int_{\Omega} BRDF * L_{\text{i, reflected}}(p, \omega_{\text{i}}) \left | \cos \theta_{\text{i}} \right | d\omega_{\text{i}} \ + \ \int_{\Omega} BTDF * L_{\text{i, refracted}}(p, \omega_{\text{i}}) * \left | \cos \theta_{\text{i}} \right | d\omega_{\text{i}} \end{align*}

So, in summary, we use $$D$$ to get the percentage of light that will bounce in the outgoing direction, and $$F$$, to find out what percentage of the remaining light will reflect/refract. Both these use $$H$$, because that is the surface orientation that allows a mirror reflection between $$V$$ and $$V'$$

• Oh I had totally missed that this was already a result in the paper. That certainly clears it. :) I'll have to reread it to get a better grasp of how it fits within the BRDF though. – Julien Guertault May 26 '16 at 9:00

The Fresnel coefficient should be evaluated using $H$, not $N$.

You wrote,

I have trouble seeing why we can still use that formula in a BRDF, which is supposed to approximate the integral over all the hemisphere.

It's not. The BRDF in itself does not approximate the integral over all the hemisphere. The rendering equation does that: you integrate over all incoming light directions, but each time the BRDF inside the integral is evaluated, it's for one specific choice of incoming and outgoing ray directions.

For microfacet BRDFs, the usual simplifying assumption is that individual microfacets are perfect specular reflectors. Then, given the $L$ and $V$ at which to evaluate, the only microfacets that can contribute are those that are aligned along $H = \text{normalize}(L+V)$, because that's the only way they can reflect light from the incoming to the outgoing ray.

The normal distribution function and the visibility factor in the BRDF together approximate the density of microfacets oriented along $H$ that are visible from both the $L$ and $V$ directions. The Fresnel factor is evaluated for those microfacets, so the correct angle to use is the one between $L$ and $H$, or equivalently $V$ and $H$.

There are a couple cases where this argument gets modified. One is if the microfacet model assumes something other than perfect specularity. For instance, the Oren-Nayar BRDF assumes Lambertian microfacets. In this case the BRDF has to incorporate some kind of integral over all the possible microfacet orientations that can scatter light from $L$ to $V$. Then the BRDF won't have a standard Fresnel factor at all; it'll have some other formula that approximates the result of integrating the Fresnel factor over the normal hemisphere.

The other case that comes up in real-time graphics is the reflection from an environment map. To be really correct, we should integrate the environment map multiplied by the BRDF over all incoming light directions, but in practice we often sample a prefiltered environment map using the dominant reflection vector $R = \text{reflect}(V, N)$ and then multiply it by some approximate Fresnel formula that depends on the angle between $R$ and $N$ (equivalently $V$ and $N$), as well as the surface roughness. This is very much an approximation, but often good enough for real-time use.