Path tracing is a method for generating digital images by simulating how light would interact with objects in a virtual world. The path of light is traced by shooting rays (line segments) into the scene and tracking them as they bounce between objects. Path tracing gets its name from calculating the full path of light from a light source to the camera. Light can potentially bounce between many objects inside the virtual scene. As a ray of light hits a surface, it bounces and creates new rays of light. A path can therefore consist of a number of rays. By collecting all of the rays along a path together, the contributions of a light source and the surfaces along the path can be calculated. These calculations are used to produce a final image.