Fast Distributed Ray Tracing Effects via the OpenGL Accumulation Buffer


Distributed ray tracing achieves advanced rendering features like antialiasing, motion blur, depth of field and soft shadows by casting multiple rays where ordinary ray tracing would cast a single ray. The resulting samples generated by these multiple rays are then reconstructed into a single sample that more accurately represents the result.

The accumulation buffer is a higher precision frame buffer used to accumulate intermediate rendering results.Instead of rays, viewing and projection matrices are altered to provide multiple samples. These multiple samples result in multiple images, and these images are typically added into the accumulation buffer. The resulting accumulated images are then usually scaled to produce an average that represents a box-filtered reconstruction of the individual sample images.

The following examples demonstrate the accumulation buffer. They were copied from a SIGGRAPH 96 Course on Programming with OpenGL . I modified them to run in single buffered mode so you can see how each sample frame is altered, and compiled them in Debug mode so they would run slow enough to watch. The source, project files and workspace are available as accum.zip . You may need the GLUT32.DLL file to run these if you haven't installed GLUT.
 


Antialiasing demo screenshot

Depth of Field demo screenshot
Antialiasing
(source ,executable )
Depth of Field
(source ,executable )

Motion Blur demo screenshot

Soft Shadow demo screenshot
Motion Blur
( source , executable )
Soft Shadows
( source , executable )