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:
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_paint_image.cc')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_paint_image.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_paint_image.cc b/source/blender/editors/sculpt_paint/sculpt_paint_image.cc
index da8758b1f20..082ff6260c2 100644
--- a/source/blender/editors/sculpt_paint/sculpt_paint_image.cc
+++ b/source/blender/editors/sculpt_paint/sculpt_paint_image.cc
@@ -247,15 +247,18 @@ template<typename ImageBuffer> class PaintingKernel {
}
float3 init_pixel_pos(const TrianglePaintInput &triangle,
- const float3 &barycentric_weights) const
+ const float2 &barycentric_weights) const
{
const int3 &vert_indices = triangle.vert_indices;
float3 result;
+ const float3 barycentric(barycentric_weights.x,
+ barycentric_weights.y,
+ 1.0f - barycentric_weights.x - barycentric_weights.y);
interp_v3_v3v3v3(result,
mvert[vert_indices[0]].co,
mvert[vert_indices[1]].co,
mvert[vert_indices[2]].co,
- barycentric_weights);
+ barycentric);
return result;
}
};