"Physically Based Rendering:From Theory To Implementation" by Matt Pharr, Wenzel Jakob, and Greg Humphreys is now available for free. It's describes both the mathematical theory behind a modern photorealistic rendering system as well as its practical implementation.
The authors of this book won an Academy Award for Scientific and Technical Achievement from the Academy of Motion Picture Arts and Sciences based on the knowledge shared in the first and second editions of the book this book (2014).
The Academy called the book a “widely adopted practical roadmap for most physically based shading and lighting systems used in film production.”
This book has been brought up to date and is now available online for free.