[Bf-blender-cvs] [1fad269] master: Fix T49609: Point density textures: vertex colors are not properly averaged in BI
Daisuke Takahashi
noreply at git.blender.org
Sun Oct 9 13:17:19 CEST 2016
Commit: 1fad269d07d49619303bd61fcd3166376e8f66b4
Author: Daisuke Takahashi
Date: Sun Oct 9 13:16:19 2016 +0200
Branches: master
https://developer.blender.org/rB1fad269d07d49619303bd61fcd3166376e8f66b4
Fix T49609: Point density textures: vertex colors are not properly averaged in BI
Nice to have in 2.78a, though not a regression.
===================================================================
M source/blender/render/intern/source/pointdensity.c
===================================================================
diff --git a/source/blender/render/intern/source/pointdensity.c b/source/blender/render/intern/source/pointdensity.c
index e4da430..a03ea9c 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];
}
More information about the Bf-blender-cvs
mailing list