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

EFloat GetAbsoluteError() #167

Closed ksmolenskiy closed 4 years ago

ksmolenskiy commented 6 years ago

Hello!

EFloat's GetAbsoluteError() seems too conservative. float GetAbsoluteError() const { return high - low; }

Shouldn't it return (high - low) * 0.5 , or maybe NextFloatUp(max(abs(high - v), abs(v - low))) ??

mmp commented 4 years ago

Thanks!