In this section a hybrid two-pass algorithm is introduced that has been proposed by Lafortune which does not need mesh generation either [LW93]. This method is based on the bi-directional particle tracing since particles are shot at the same time from a selected light source and the viewpoint. After this, shadow rays are used to connect each intersection point in the light path with each intersection point in the eye path, and contributions are added to the flux of the relevant pixel.
Random walks can be written as:
The direction in the light path is sampled according to the subcritical pdf (spdf):
where is the bi-directional reflection distribution function (BRDF). The direction in the eye path is sampled the same way:
After generating a light path and an eye path all intersection points are linked by shadow rays. The flux is estimated by a weighted sum:
where factors express the estimates of the flux found by i reflections on the eye path and j reflections on the eye path. These factors are evaluated differently according to the following three cases:
There are various alternatives to choose the weights for the contributions . For example the classical path tracing is the special case of this generic algorithm using the following weights: