Commit 9c555671 authored by TheNumbat's avatar TheNumbat
Browse files

fix a3.5 ref

parent 77a0d367
......@@ -20,8 +20,8 @@ In order to correctly implement `hit` you need to understand some of the fields
* `point`: the 3D point of origin of the ray
* `dir`: the 3D direction of the ray (always normalized)
* `dist_bounds`: the minimum and maximum distance along the ray. Primitive intersections that lie outside the [`ray.dist_bounds.x`, `ray.dist_bounds.y`] range should be disregarded.
* `depth`: the recursive depth of the ray (Used in task 5).
* `throughput`: the fraction of incoming light along this ray that will contribute to the final image (Task 5).
* `depth`: the recursive depth of the ray (Used in task 4).
* `throughput`: the fraction of incoming light along this ray that will contribute to the final image (Optionally used in task 4).
One important detail of the ray structure is that `dist_bounds` is a mutable field. This means that it can be modified even in `const` rays, for example within `Triangle::hit`. When finding the first intersection of a ray and the scene, you will want to update the ray's `dist_bounds` value after finding each hit with scene geometry. By bounding the ray as tightly as possible, your ray tracer will be able to avoid unnecessary tests with scene geometry that is known to not be able to result in a closest hit, resulting in higher performance.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment