mmp / pbrt-v3

Source code for pbrt, the renderer described in the third edition of "Physically Based Rendering: From Theory To Implementation", by Matt Pharr, Wenzel Jakob, and Greg Humphreys.
http://pbrt.org
BSD 2-Clause "Simplified" License
4.88k stars 1.19k forks source link

Minor update #105

Closed JiayinCao closed 7 years ago

JiayinCao commented 7 years ago

Avoid dividing by zero case in fourier bsdftable loading pass. Avoid allocating more memory when evaluating pdf for fourier bsdf.

wjakob commented 7 years ago

Hi Jerry,

the ALLOCA looks reasonable. However, let's keep the division by zero -- the result is never used as you say and is a perfectly legitimate operation in IEEE754 arithmetic, so there is no reason to add extra code to work around it.

Best, Wenzel

JiayinCao commented 7 years ago

Noted. Closing the PR.