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
This commit is contained in:
parent
3b1f90ed84
commit
0eb61c799d
Notes:
blender-bot
2023-02-14 04:58:54 +01:00
Referenced by issue #57994, Non-expected values in vertex color layer for vertex index (Particle Instance modifier)
|
@ -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];
|
||||
|
|
Loading…
Reference in New Issue