Physically Based Rendering: From Theory to Implementation, Third Edition, is available as Hardcover or eBook from Morgan Kaufmann or Amazon. The Web site for this book is located at www.pbrt.org and since October 2018 the full text is available for free in an online edition.
The C++ source code described in the book is available from github.
This web page is called
rs-pbrt to indicate that the C++ source code
was translated to a new programming language called
Rust. The source code of the Rust version
is available from GitHub or
The Rust source code is documented here.