[Bf-blender-cvs] [6087a59] cycles_point_density: Fix for particle texture evaluation.
Lukas Tönne
noreply at git.blender.org
Mon Apr 6 20:13:10 CEST 2015
Commit: 6087a590c48b35132a08003d56c80fe85b69a1e3
Author: Lukas Tönne
Date: Mon Apr 6 20:11:52 2015 +0200
Branches: cycles_point_density
https://developer.blender.org/rB6087a590c48b35132a08003d56c80fe85b69a1e3
Fix for particle texture evaluation.
RGB value from intensity was overriding explicit texture values in every
case, only do this for scalar modes.
===================================================================
M source/blender/editors/space_view3d/drawobject.c
===================================================================
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 9c984dc..5184ada 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -5231,9 +5231,13 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
switch (part->draw_col) {
case PART_DRAW_COL_VEL:
intensity = len_v3(pa->state.vel) / part->color_vec_max;
+ CLAMP(intensity, 0.f, 1.f);
+ weight_to_rgb(ma_col, intensity);
break;
case PART_DRAW_COL_ACC:
intensity = len_v3v3(pa->state.vel, pa->prev_state.vel) / ((pa->state.time - pa->prev_state.time) * part->color_vec_max);
+ CLAMP(intensity, 0.f, 1.f);
+ weight_to_rgb(ma_col, intensity);
break;
case PART_DRAW_COL_TEX: {
ParticleTexture ptex;
@@ -5242,12 +5246,10 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
break;
}
default:
- intensity = 1.0f; /* should never happen */
+ weight_to_rgb(ma_col, 1.0f); /* should never happen */
BLI_assert(0);
break;
}
- CLAMP(intensity, 0.f, 1.f);
- weight_to_rgb(ma_col, intensity);
}
}
else {
More information about the Bf-blender-cvs
mailing list