Closed syoyo closed 7 years ago
clang-format did some code reformat, but the core of change is here: https://github.com/mmp/pbrt-v3/compare/master...syoyo:better-focus-ray-search?expand=1#diff-2ca607d646ef4f24ea00346f9144205fL486
clang-format
The situation can be reproduced in dragons.pbrt scene, by setting aperturediameter smaller and focusdistance shorter like this.
aperturediameter
focusdistance
Camera "realistic" "string lensfile" "lenses/wide.22mm.dat" "float aperturediameter" 2 "float focusdistance" .2
In this situation, it fails to find focus ray thus focusing takes too much time.
This PR tries to use different scaling factor for finding focus ray more quickly when aperturediameter is too small.
Thanks! Merged manually.
Thank you!
clang-format
did some code reformat, but the core of change is here: https://github.com/mmp/pbrt-v3/compare/master...syoyo:better-focus-ray-search?expand=1#diff-2ca607d646ef4f24ea00346f9144205fL486The situation can be reproduced in dragons.pbrt scene, by setting
aperturediameter
smaller andfocusdistance
shorter like this.In this situation, it fails to find focus ray thus focusing takes too much time.
This PR tries to use different scaling factor for finding focus ray more quickly when aperturediameter is too small.