16.3.3: Subpath connections

The ConnectBDPT() function takes the light and camera subpaths and the number of vertices s and t to use from each one, respectively. It returns the corresponding strategy’s contribution.

The connection strategy with t = 1 uses only a single camera vertex, the camera’s position; the raster position of the path’s contribution is then based on which pixel the last vertex of the light subpath is visible in (if any). In this case, the resulting position is returned via the pRaster argument.

BDPT Method Definitions〉 ≡ Spectrum ConnectBDPT(const Scene &scene, Vertex *lightVertices,   Vertex *cameraVertices, int s, int t,   const Distribution1D &lightDistr, const Camera &camera, Sampler &sampler, Point2f *pRaster, Float *misWeightPtr) ...

Get Physically Based Rendering, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.