- Cramer's rule for computing triangle intersections
- OpenMP parallelism
- Glossy surfaces are modeled using Phong light
- Point light
- Anti-aliasing and soft shadows by shooting slightly perturbed rays each time
- Point lights are replaced by emissive surfaces
- The color values can sometimes be higher than
vec3(1,1,1)
, which means they are clipped when passed toPutPixelSDL
. To convert the colors from HDR to LDR we experimented with different tone mapping and gamma correction methods.
- The amount of light reflected when light enters another medium is computed using Schlick's approximation for Fresnel's equations
- Total internal refraction
- Beer’s law models light being absorbed over distance as it travels through a transparent material. The extinction (absorption) describes how much of each colour channel absorbs over distance. For example, a value of
(8.0, 2.0, 0.1)
would make red get absorbed the fastest, then green, then blue, so would result in a blueish, slightly green color object. The first picture shows a fully transparent object, while the second cube has a refraction index of1.52
.
- Based on the distance travelled by a ray and on the height