Path-Tracing

This tutorial demonstrates how to turn on path-tracing and set the algorithm options to render interactive or final high quality images.

Turning path-tracing on is simply a matter of passing the right feedback mode (RED::FTF_PATH_TRACING) to the RED::IWindow::FrameTracing method. Once done, the rendering will start immediately using path-tracing (no GI cache will be computed, see Path-Tracing for details).

Then, the quality of the rendering is controlled interactively by setting the number of paths per pixel:

RED::Object* resmgr = RFK::TutorialApplication::GetResourceManager();
RED::IResourceManager* iresmgr = resmgr->As< RED::IResourceManager >();

RED::Object* window = RFK::TutorialApplication::GetWindow();
RED::IWindow* iwindow = window->As< RED::IWindow >();

RED::Object* vrl;
RC_TEST( iwindow->GetDefaultVRL( vrl ) );

RED::IViewpointRenderList* ivrl = vrl->As< RED::IViewpointRenderList >();
RC_TEST( ivrl->SetSoftAntiAlias( uvars[0]._i, iresmgr->GetState() ) );

RC_TEST( RFK::TutorialApplication::Invalidate() );