diff options
| author | Martin Lehoux <martin@lehoux.net> | 2020-04-04 19:20:27 -0700 |
|---|---|---|
| committer | Martin Lehoux <martin@lehoux.net> | 2020-04-04 19:20:27 -0700 |
| commit | d233910be5eb6bdf9bb9deb6ffa0fa79f659e902 (patch) | |
| tree | c277697380b9b59cb3e65ebc3b79336898cddb04 | |
| parent | 23d71549ebf82d9065de978f50d911bc51931635 (diff) | |
misc - Correct distribution for scattering in lambertian
| -rw-r--r-- | color.go | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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)) |
