Merge branch 'master' into blender2.8
[blender.git] / source / blender / modifiers / intern / MOD_particleinstance.c
index b93e567fe56c25bb76cf96acb543f1af50938a25..651a5a96676b746ac5a9dde5e7405b7616ab7639 100644 (file)
@@ -197,7 +197,7 @@ static bool particle_skip(ParticleInstanceModifierData *pimd, ParticleSystem *ps
 
 static void store_float_in_vcol(MLoopCol *vcol, float float_value)
 {
-       const uchar value = FTOCHAR(float_value);
+       const uchar value = unit_float_to_uchar_clamp(float_value);
        vcol->r = vcol->g = vcol->b = value;
        vcol->a = 1.0f;
 }