The main render loop for integrators implementing the
SamplerIntegrator trait can be found here.
There are two more render loops:
Acceleration structures are one of the components at the heart of any ray tracer. Without algorithms to reduce the number of unnecessary ray intersection tests, tracing a single ray through a scene would take time linear in the number of primitives in the scene, since the ray would need to be tested against each primitive in turn to find the closest intersection.
The abstract Camera base class holds generic camera options and defines the interface that all camera implementations must provide.
All the code for the PBRT core.
All filter implementations are derived from an abstract Filter class, which provides the interface for the functions used in filtering.
Integrator is an abstract base class that defines the render() method that must be provided by all integrators.
In order for objects in a scene to be visible, there must be a source of illumination so that some light is reflected from them to the camera sensor.
The abstract Material class defines the interface that material implementations must provide.
Implementations of the Medium base class provide various representations of volumetric scattering properties in a region of space.
The Sampler base class not only defines the interface to samplers but also provides some common functionality for use by Sampler implementations.
Careful abstraction of geometric shapes in a ray tracer is a key component of a clean system design, and shapes are the ideal candidate for an object-oriented approach. All geometric primitives implement a common interface, and the rest of the renderer can use this interface without needing any details about the underlying shape. This makes it possible to separate the geometric and the shading subsystem of pbrt.
Texture is a template class parameterized by return type of its evaluation function. This design makes it possible to reuse almost all of the code among textures that return different types. PBRT currently uses only Float and Spectrum textures.