diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-02-03 21:35:09 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-02-03 21:45:30 +0300 |
commit | 02acfdab9eeb01f0394f5428038d39db54096401 (patch) | |
tree | e0f2f08a43f2615b1fc4b17f3a87417c2a4ff49e /source/blender/modifiers | |
parent | 15cd2222702dabcb29cfba6f072b84ed1c52ec11 (diff) |
Add inverse-square blending for PET and warp
Similar to 'Root' but without noticeable spike/pinch in the center.
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r-- | source/blender/modifiers/intern/MOD_warp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/modifiers/intern/MOD_warp.c b/source/blender/modifiers/intern/MOD_warp.c index ed0d18fc484..3eb34e56700 100644 --- a/source/blender/modifiers/intern/MOD_warp.c +++ b/source/blender/modifiers/intern/MOD_warp.c @@ -265,6 +265,9 @@ static void warpModifier_do(WarpModifierData *wmd, Object *ob, case eWarp_Falloff_Sphere: fac = sqrtf(2 * fac - fac * fac); break; + case eWarp_Falloff_InvSquare: + fac = fac * (2.0f - fac); + break; } fac *= weight; |