http://sidneys77crlfslcr7zmj3msmxchgnxhrxlp3p3kbaswo7twchjnicid.onion/programming/2022/03/23/raytracing.html
ray sample_ray({ x, y, 0 }, { 0, 0, 1 }); - // TODO: We now need to test if this ray hits any Shapes and produces
- // a color. + // Sample this ray - if the ray doesn't hit anything, use the color of
+ // the surrounding fog.
+ return SampleRay(sample_ray).value_or(FOG); Add intersection and sample methods to Shapes Our SampleRay function has been upgraded to search for a Shape that it intersects with. To do this, Shape has been
upgraded with two new virtual...