aboutsummaryrefslogtreecommitdiff
path: root/color.go
diff options
context:
space:
mode:
authorMartin Lehoux <martin@lehoux.net>2020-04-04 17:53:48 -0700
committerMartin Lehoux <martin@lehoux.net>2020-04-04 17:53:48 -0700
commitf230ab264adebce9868d088ea408445d66254963 (patch)
treea7c4635e80b1d905b32e7bd02e372897bff2e905 /color.go
parent1e77295876e20702d5ccb477b2f01df980723f04 (diff)
feat - Add several entities
Diffstat (limited to 'color.go')
-rw-r--r--color.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/color.go b/color.go
index 1ac8141..b8776ca 100644
--- a/color.go
+++ b/color.go
@@ -16,8 +16,8 @@ func LinearBlend(color1 Color, color2 Color, param float64) Color {
}
}
-func RayColor(ray Ray, hitable Hitable) Color {
- hit := hitable.Hit(ray)
+func RayColor(ray Ray, hitable_list HitableList) Color {
+ hit := hitable_list.Hit(ray, T_MIN, T_MAX)
if hit.time > 0.0 {
vec := AddVec3D(hit.normal, Vec3D{1.0, 1.0, 1.0})
return LinearBlend(Color{vec.x, vec.y, vec.z}, Color{0.0, 0.0, 0.0}, 0.5)