In the previous commit I noted that plane may not interact with light,
if the normal has the wrong sign. This commit changes but now a plane is
illuminated through itself - it diffuses light that is on the other side
than the camera.
This could be excused arguing that it is an infinitely thin piece so it
should emit light on both sides, but I would rather it would only
emit light on the side it is illuminated on.
normal = get_object_normal(object, point);
angle_multiplier = vec_scalar_mul(normal, new_ray.direction)
/ (vec_norm(normal) * vec_norm(new_ray.direction));
+ if (object->type == PLANE)
+ angle_multiplier = fabs(angle_multiplier);
if (angle_multiplier > 0 && (!obstruction
|| 1 < get_intersection_arg(&new_ray, obstruction)
|| get_intersection_arg(&new_ray, obstruction) < 0))