From 17b76e8c075e298ab40ed392fbb7ad2a291b1dd8 Mon Sep 17 00:00:00 2001 From: TheNumbat Date: Mon, 19 Oct 2020 23:10:57 -0400 Subject: [PATCH] remove advice to update time_bounds --- docs/pathtracer/intersecting_objects.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/pathtracer/intersecting_objects.md b/docs/pathtracer/intersecting_objects.md index 769a833..197be2d 100644 --- a/docs/pathtracer/intersecting_objects.md +++ b/docs/pathtracer/intersecting_objects.md @@ -16,9 +16,9 @@ In order to correctly implement `hit` you need to understand some of the fields * `point`: represents the 3D point of origin of the ray * `dir`: represents the 3D direction of the ray (this direction will be normalized) -* `time_bound`: correspond to the minimum and maximum points on the ray with its x-component as the lower bound and y-component as the upper bound. That is, intersections that lie outside the [`ray.time_bound.x`, `ray.time_bound.y`] range should not be considered valid intersections with the primitive. +* `time_bounds`: correspond to the minimum and maximum points on the ray with its x-component as the lower bound and y-component as the upper bound. That is, intersections that lie outside the [`ray.time_bounds.x`, `ray.time_bounds.y`] range should not be considered valid intersections with the primitive. -One important detail of the Ray structure is that `time_bound` is a mutable field of the Ray. This means that this fields can be modified by constant member functions such as `Triangle::hit`. When finding the first intersection of a ray and the scene, you almost certainly want to update the ray's `time_bound` 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. + --- -- GitLab