Subject: Use of the last_hit parameter is find_closest_object (This message is being sent to CPSC 215 Students and TA's) obj_t *find_closest_object( list_t *lst, /* Visible Object list */ double *base, /* Base of ray */ double *dir, /* direction of ray */ obj_t *last_hit, /* -> object last hit (or NULL) */ double *closest_dist); /* return dist to hitloc here */ For diffuse illumination to work it is necessary to use set the last_hit parameter to the "hitobj" when calling find_closest_object(). Inside find_closest_object() you MUST NOT test the last_hit object (because if you do you will find that the ray fired from the hitobj toward the light hits the hitobj at a distance 0.0 and you will mistakenly conclude the hitobj is occluded)!