From d233910be5eb6bdf9bb9deb6ffa0fa79f659e902 Mon Sep 17 00:00:00 2001 From: Martin Lehoux Date: Sat, 4 Apr 2020 19:20:27 -0700 Subject: misc - Correct distribution for scattering in lambertian --- color.go | 1 + 1 file changed, 1 insertion(+) (limited to 'color.go') diff --git a/color.go b/color.go index 7c7bc58..857bc41 100644 --- a/color.go +++ b/color.go @@ -32,6 +32,7 @@ func RayColor(ray Ray, hitable_list HitableList, depth int) Color { } hit := hitable_list.Hit(ray, T_MIN, T_MAX) if hit.time > 0.0 { + // TODO: Use the correct distribution direction := AddVec3D(hit.normal, RandomInUnitSphere()) scattered := Ray{hit.point, direction} return AttenuateColor(Color{0.5, 0.5, 0.5}, RayColor(scattered, hitable_list, depth+1)) -- cgit v1.3