Thursday, August 6, 2015

Fresnel Equations

When I tried to do a slightly more careful Brewster's angle test last week it quickly became apparent my reflectances were wrong.   After a long painful bug hunt, it turns out that I had the polarization components (parallel and perpendicular) reversed the the Fresnel code.    This is probably the most painful bit of code if you are used to using the Schlick approximation (which I am), so it's not surprising it was the culprit.

In the image below there are still lots of not so subtle differences.   I'll do some more physical tests after siggraph because they may mainly be however the iphone is tone mapping combined with my lack of positional/geometric calibration.  

Rendering on left and photo on right.   Note the very dim reflection of the iPad because the camera is near Brewster's angle.




No comments: