patterns: implement object and pattern transformation awareness.
This commit is contained in:
@@ -44,7 +44,15 @@ fn main() -> Result<()> {
|
||||
let point = r.position(hit.t);
|
||||
let normal = hit.object.normal_at(point);
|
||||
let eye = -r.direction;
|
||||
let color = lighting(&hit.object.material, &light, point, eye, normal, in_shadow);
|
||||
let color = lighting(
|
||||
&hit.object.material,
|
||||
&hit.object,
|
||||
&light,
|
||||
point,
|
||||
eye,
|
||||
normal,
|
||||
in_shadow,
|
||||
);
|
||||
c.set(x, y, color);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user