The "dof" value specifies the size of the circle of confusion and "focaldist" is the distance from the camera to the focal point.

Source Code

The following source code files are provided to help you with this and upcoming projects. You are not required to use them, but it is highly recommened that you use some of them. Some of these files include additional code as compared to the same files in the previous project, so make sure to download them all again.

scene.h: Includes changes to the Camera class to keep the depth of field related parameters.

xmlload.cpp: Includes the LoadScene() function that parses a given scene XML file using the TinyXML library.

viewport.cpp: OpenGL based preview and user interface launched by calling the ShowViewport() function based on the GLUT library (the Windows version is here). This version supports depth of field preview.

Test Scenes

The following scene files are provided to help you test your implementation. You can also prepare other scenes to show your work.

Test scene: Reflective balls and a teapot, using some of the previous models and textures.