16.2.5: Visible point grid construction
During the photon pass, whenever a photon intersects a surface, we need to efficiently find the visible points where the distance from the visible point to the photon’s intersection is less than the current search radius ri for the visible point’s pixel. The implementation here uses a uniform grid over the bounding box of all of the visible points; Exercise 16.7 at the end of the chapter has you implement other data structures in place of the grid and investigate trade-offs.
〈Create grid of all SPPM visible points〉 ≡ 976
〈Allocate grid for SPPM visible points 980〉
〈Compute grid bounds for SPPM visible points 981〉
〈Compute resolution of ...
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.