Commit Graph

10 Commits

Author SHA1 Message Date
Lukas Stockner
d9281a6332 Cycles: Fix three numerical issues in the fresnel, normal map and Beckmann code
- In fresnel_dielectric, the differentials calculation sometimes divided by zero.
- When the normal map was (0.5, 0.5, 0.5), the code would try to normalize a zero vector. Now, it just uses the regular normal as a fallback.
- The approximate error function used in Beckmann sampling sometimes overflowed to inf while calculating r^16. The final value is 1 - 1/r^16, however,
  so now it just returns 1 if the computation would overflow otherwise.
2016-07-16 20:54:14 +02:00
e602fe60c0 Code cleanup: resolve minor Cycles todo's. 2016-02-06 11:56:37 +01:00
Campbell Barton
fc9505c9c5 Cleanup: warnings & spelling 2015-12-02 13:15:52 +11:00
Thomas Dinges
85876923bf Cleanup: Remove ToDo comment.
I don't see how this could conflict, madd() in util_ssef.h has a different function signature.
2015-10-26 11:52:24 +01:00
Sergey Sharybin
b45ad4b214 Cycles: Fix for wrong clamp usage in fast math 2015-05-06 00:01:40 +05:00
Sergey Sharybin
a9bb8d8a73 Cycles: de-duplicate fast/approximate erf function calculation
Our own implementation is in fact the same performance as in fast_math from
OpenShadingLanguage, but implementation from fast_math is using explicit madd
function, which increases chance of compiler deciding to use intrinsics.
2015-04-06 12:49:44 +05:00
Sergey Sharybin
5004b58262 Cycles: Make util_math_fast.h compatible with OpenCL 2015-02-19 12:29:06 +05:00
Sergey Sharybin
bf4c44491a Cycles: Some more constants fixes for fast math 2015-02-06 15:40:07 +05:00
Sergey Sharybin
460681bd62 Cycles: Use proper constant name for 1/pi in fast math 2015-02-06 15:15:55 +05:00
Sergey Sharybin
dc1043dda0 Cycles: Add fast math function module
It is based on fmath.h from OIIO and could be used to give some speedup
in areas where absolute accuracy is not so critical.
2015-01-31 01:49:41 +05:00