Rough Dielectric

To implement Rough Dielectrics we followed this tutorial in the PBR-Book . Our main challenge was getting the formulas to work in such a way that: a) the glass actually behaves like glass (and not like a void), and b) does not create an exorbitant amount of noise. The solution to both issues involved the inclusion of additional checks and a lengthy process of tweaking the formulas through trial and error.

Below, you can see shapes (and a knight we spent too much time fixing, only to end up not using him in the actual scene — so now he's here) with different roughness levels:
0 (left), 0.25 (center), 0.5 (right)

Code:

  • src/bsdfs/roughdielectric.cpp
Spoiler: Implementation of this feature in our final render
    The skull uses a rough DIElectric material with roughness 0.4