diff options
author | Mike Reed <reed@google.com> | 2017-05-05 14:34:56 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-05-05 19:03:41 +0000 |
commit | b1485f2a05faad77bb849a911ddc83fddb96514e (patch) | |
tree | f520eee6dbfb469f8655ac72931a3cd0c7a2b1f7 | |
parent | 04c3731de81d9d204f41624dca8af071873b7a67 (diff) |
tweak the gaussian quartic
Bug: skia:
Change-Id: I0e50568ddea344443ae80c24aad3eb43736f77bc
Reviewed-on: https://skia-review.googlesource.com/15636
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
-rw-r--r-- | src/utils/SkShadowUtils.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/utils/SkShadowUtils.cpp b/src/utils/SkShadowUtils.cpp index 159b2e7859..c6102a908d 100644 --- a/src/utils/SkShadowUtils.cpp +++ b/src/utils/SkShadowUtils.cpp @@ -56,11 +56,12 @@ private: }; static inline float eval_gaussian(float x) { - x = 1 - x; -// return sk_float_exp(-x * x * 4) - 0.018f; - return 1 + x*(-0.209218561649322509765625f + - x*(-4.692357540130615234375f + - x*(6.168495655059814453125f + x*(-2.2666122913360595703125f)))); + // return sk_float_exp(-x * x * 4) - 0.018f; + + return 0.00030726194381713867f + + x*(0.15489584207534790039f + + x*(0.21345567703247070312f + + (2.89795351028442382812f - 2.26661229133605957031f*x)*x)); } static void build_table() { |