[Bf-blender-cvs] [acd7915371a] functions: fix computing cumulative distribution

Jacques Lucke noreply at git.blender.org
Wed Aug 28 18:05:43 CEST 2019


Commit: acd7915371a29b2f8d22df7bbf1cb3a353e7e222
Author: Jacques Lucke
Date:   Wed Aug 28 18:05:39 2019 +0200
Branches: functions
https://developer.blender.org/rBacd7915371a29b2f8d22df7bbf1cb3a353e7e222

fix computing cumulative distribution

===================================================================

M	source/blender/simulations/bparticles/emitters.cpp

===================================================================

diff --git a/source/blender/simulations/bparticles/emitters.cpp b/source/blender/simulations/bparticles/emitters.cpp
index 18ebca0aa95..0968a682150 100644
--- a/source/blender/simulations/bparticles/emitters.cpp
+++ b/source/blender/simulations/bparticles/emitters.cpp
@@ -107,7 +107,7 @@ static BLI_NOINLINE void compute_cumulative_distribution(
 {
   BLI_assert(weights.size() + 1 == r_cumulative_weights.size());
 
-  r_cumulative_weights[0] = weights[0];
+  r_cumulative_weights[0] = 0;
   for (uint i = 0; i < weights.size(); i++) {
     r_cumulative_weights[i + 1] = r_cumulative_weights[i] + weights[i];
   }



More information about the Bf-blender-cvs mailing list