-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Try inserting the following statements to the RenderEngine class color_at() method after line 125 of the engine.py module:
# Test if to_light ray hits another object before reaching the light.
(dist, hit) = self.find_nearest(to_light, scene)
if hit is None or (dist > (light.position - hit_pos).magnitude()):
and indent the subsequent "Diffuse and Specular shading" code blocks underneath the newly inserted if statement.
ref: "Shadow Rays" slides in https://www.inf.ed.ac.uk/teaching/courses/cg/lectures/slides10.pdf
Metadata
Metadata
Assignees
Labels
No labels