From e65a2a1f488d050e0c0ea0bc33ac3f91d380c227 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Mon, 23 Mar 2020 16:58:29 +0100 Subject: [PATCH] WIP: add comment about path-tracing --- pathtracer/src/render/scene.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pathtracer/src/render/scene.rs b/pathtracer/src/render/scene.rs index adebd8b..e543389 100644 --- a/pathtracer/src/render/scene.rs +++ b/pathtracer/src/render/scene.rs @@ -173,6 +173,9 @@ impl Scene { let normal = object.shape.normal(&point); let reflected_ray = reflected(incident_ray, normal); + // FIXME: change this to averaged sampled rays instead of visiting every light ? + // Indeed the path-tracing algorithm is good for calculating the radiance at a point + // But it should be used for reflection and refraction too... let lighting = self.illuminate(point, object_color, &properties, normal, reflected_ray); if properties.refl_trans.is_none() { // Avoid calculating reflection when not needed