diff options
Diffstat (limited to 'color.go')
| -rw-r--r-- | color.go | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -17,7 +17,8 @@ func LinearBlend(color1 Color, color2 Color, param float64) Color { } func RayColor(ray Ray, hitable Hitable) Color { - if hitable.Hit(ray) { + hit := hitable.Hit(ray) + if hit.time > 0 { return Color{1.0, 0.0, 0.0} } param := 0.5 * (ray.direction.Unit().y + 1) |
