diff options
author | Daisuke Takahashi <noreply@blender.org> | 2016-10-09 14:16:19 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-10-09 14:17:09 +0300 |
commit | 1fad269d07d49619303bd61fcd3166376e8f66b4 (patch) | |
tree | 756b6d3868327a5a7ccc66df2f66ab65ed2253b5 /source/blender/render | |
parent | 4cb60b14e09bbd4a112cb5d8390b3952ab4c4566 (diff) |
Fix T49609: Point density textures: vertex colors are not properly averaged in BI
Nice to have in 2.78a, though not a regression.
Diffstat (limited to 'source/blender/render')
-rw-r--r-- | source/blender/render/intern/source/pointdensity.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/render/intern/source/pointdensity.c b/source/blender/render/intern/source/pointdensity.c index e4da4302efe..a03ea9cb896 100644 --- a/source/blender/render/intern/source/pointdensity.c +++ b/source/blender/render/intern/source/pointdensity.c @@ -333,7 +333,16 @@ static void pointdensity_cache_vertex_color(PointDensity *pd, Object *UNUSED(ob) for (i = 0; i < totloop; i++) { int v = mloop[i].v; - rgb_uchar_to_float(&data_color[v*3], &mcol[i].r); + + if (mcorners[v] == 0) { + rgb_uchar_to_float(&data_color[v * 3], &mcol[i].r); + } + else { + float col[3]; + rgb_uchar_to_float(col, &mcol[i].r); + add_v3_v3(&data_color[v * 3], col); + } + ++mcorners[v]; } |