In a previous post I talked about my debugging of refraction code. In that ray tracer I was using linear polarization and used these full Fresnel equations:
Christophe Schlick proposed a nice simple approximation that is quite accurate:
R = (1-R0)(1-cosTheta)^5
A key issue is that the Theta is the **larger** angle. For example in my debugging case (drawn with limnu which has some nice new features that made this easy):
The reason for this post is that I have this wrong in my book Ray Tracing in One Weekend :
Note that the first case (assuming outward normals) is the one on the left where the dot product is the cos(30 degrees). The "correction" is messed up. So why does it "work"? The reflectances are small for most theta, and it will be small for most of the incorrect theta too. Total internal reflection will be right, so the visual differences will be plausible.
Thanks to Ali Alwasiti (@vexe666) for spotting my mistake!