Motion Blur

Motion blur is the effect one can observe if the camera shutter is opened for such a long time that a quickly moving object looks blurry on the fotograph. This is caused by the film receiving light rays from the same object being at different locations over a short amount of time.

In action

In our scene, the effect is visible in the doorway right in the middle, where a rat scampers around.
Because it is quite small, look at the closeup of the corresponding area below.

Closeup of the motion blurred rat

Implementation idea

Objects which are motion blurred carry information about the maximum offset they have from their inital position at time 1.0f. On tracing the ray, the objects are shifted according to the "time" at which the ray is shot. On sample generation, every sample has a time value assigned. So for one pixel one shoots more rays at different points in time and then averages over the results.

Changes made