Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2015-02-03 21:35:09 +0300
committerCampbell Barton <ideasman42@gmail.com>2015-02-03 21:45:30 +0300
commit02acfdab9eeb01f0394f5428038d39db54096401 (patch)
treee0f2f08a43f2615b1fc4b17f3a87417c2a4ff49e /source/blender/modifiers
parent15cd2222702dabcb29cfba6f072b84ed1c52ec11 (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.c3
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;