Re:Writing a Raytracer in Rust – Part 1
by pasta on Thursday March 30, 2017 @11:22AM
(#13996143)
I'm not sure this is true. The shadow ray pass is used to determine how much light is returned to the pixel. So something like:
* shoot a ray from the pixel
* when the ray hits an object check how much light that point receives
* bounce the ray according to the hit material properties
* repeat the bounces X times and gather how much light the pixel will receive.
Because most bounes are in a random direction it's best to sample a pixel multiple times. And ofcourse more bounces give a more realistic global illumination result.
* shoot a ray from the pixel
* when the ray hits an object check how much light that point receives
* bounce the ray according to the hit material properties
* repeat the bounces X times and gather how much light the pixel will receive.
Because most bounes are in a random direction it's best to sample a pixel multiple times. And ofcourse more bounces give a more realistic global illumination result.