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:
authorPablo Dobarro <pablodp606@gmail.com>2020-03-01 22:13:29 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-03-02 13:54:54 +0300
commitc930cd7450c4aeb5928f6d343fde06ae9a02ef21 (patch)
tree754c8a8632a0b42b2f61afb30513a718ee877dda /source/blender/editors
parent94937984b097fee9f0db94878f115c3592d5b454 (diff)
Clay Thumb: Remove hardcoded hardness value
Clay Thumb was using a custom hardness implementation and value to make it functional. Hardness is now a property of brushes and it is implemented for all brushes, so this is no longer needed. Reviewed By: brecht Differential Revision: https://developer.blender.org/D6981
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index e203cabe22d..c0f843a47bb 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -5344,7 +5344,6 @@ static void do_clay_thumb_brush_task_cb_ex(void *__restrict userdata,
float(*mat)[4] = data->mat;
const float *area_no_sp = data->area_no_sp;
const float *area_co = data->area_co;
- const float hardness = 0.50f;
PBVHVertexIter vd;
float(*proxy)[3];
@@ -5387,17 +5386,10 @@ static void do_clay_thumb_brush_task_cb_ex(void *__restrict userdata,
interp_v3_v3v3(intr, intr, intr_tilt, tilt_mix);
sub_v3_v3v3(val, intr_tilt, vd.co);
- /* Deform the real vertex test distance with a hardness factor. This moves the falloff
- * towards the edges of the brush, producing a more defined falloff and a flat center. */
- float dist = sqrtf(test.dist);
- float p = dist / ss->cache->radius;
- p = (p - hardness) / (1.0f - hardness);
- CLAMP(p, 0.0f, 1.0f);
- dist *= p;
const float fade = bstrength * tex_strength(ss,
brush,
vd.co,
- dist,
+ sqrtf(test.dist),
vd.no,
vd.fno,
vd.mask ? *vd.mask : 0.0f,