This commit is contained in:
Turingon 2024-03-04 21:44:12 +00:00
parent 149d220d5b
commit eda62c335b

View file

@ -105,8 +105,19 @@ Most metals however aren't purely reflective, they fuzz the reflection a little
<img src="" width="480"/>
### Chapter 9: Glass
### Chapter 9: Glass and Slowness
In this chapter glass and other dielectric materials have been implemented using Snell's law which describes refraction. The first attempt yields the following rendering:
<img src="" width="480"/>
<img src="" width="480"/>
In the later part I implemented Schlick's Approximation which approximates the reflectivity of dielectric objects depending on the angle.
Here I got some strange result (actually I already noticed that the previous render had a strange cyan sheen on the upper part of the ball, but dismissed it as a result of inaccuracies).
I oddly enough got this wrong result, when trying to render the hollow ball:
<img src="" width="480"/>
It took me some time to find the error and believe it or not, it was the 3% inaccuracy caused by the fast inverse square algorithm! I had to remove it and replace it with a more simple and accurate but slower calculation. The slow down is small but visible! Now I get:
<img src="" width="480"/>