diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2018-11-22 13:52:38 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2018-12-07 18:33:25 +0300 |
commit | 0eb61c799d0e98ccb92b12aea744c79a9da7e7c2 (patch) | |
tree | 04d95a2e9b48bd014aa96185e784e33111d10d70 /source/blender/modifiers/intern/MOD_particleinstance.c | |
parent | 3b1f90ed84c52260ce94a26c414ad8c51f6a1365 (diff) |
Fix T57994: Particle Instance modifiers 'Index Layer' off by one
better have this vertex color layer cover the whole 0-1 range
thx @sergey for checking
Maniphest Tasks: T57994
Differential Revision: https://developer.blender.org/D3976
Diffstat (limited to 'source/blender/modifiers/intern/MOD_particleinstance.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_particleinstance.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/modifiers/intern/MOD_particleinstance.c b/source/blender/modifiers/intern/MOD_particleinstance.c index d88526e2845..b6163056fe3 100644 --- a/source/blender/modifiers/intern/MOD_particleinstance.c +++ b/source/blender/modifiers/intern/MOD_particleinstance.c @@ -511,7 +511,7 @@ static DerivedMesh *applyModifier( const int ml_index = (ml - mloop); if (mloopcols_index != NULL) { const int part_index = vert_part_index[ml->v]; - store_float_in_vcol(&mloopcols_index[ml_index], (float)part_index / psys->totpart); + store_float_in_vcol(&mloopcols_index[ml_index], (float)part_index / (float)(psys->totpart-1)); } if (mloopcols_value != NULL) { const float part_value = vert_part_value[ml->v]; |