diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-03-24 16:13:13 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2013-03-24 16:13:13 +0400 |
commit | 385c72f5f26ae9c86bf40c127c44216ceea0e6c1 (patch) | |
tree | 6c0432578abee5437adc94e96b5a91c593b866b4 /source/blender/imbuf/intern/rectop.c | |
parent | 5841d1c8145ba50addeb17fa0231705d949d8b3d (diff) | |
parent | b5ce1b1a23a3befbcc4cd3c67a5ec6a76d77aa5a (diff) |
Merged changes in the trunk up to revision 55546.
Conflicts resolved:
source/blenderplayer/bad_level_call_stubs/SConscript
Partly reverted changes to intern/cycles/blender/addon/ui.py in revision 52899
to make it easier to merge trunk changes.
Diffstat (limited to 'source/blender/imbuf/intern/rectop.c')
-rw-r--r-- | source/blender/imbuf/intern/rectop.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/imbuf/intern/rectop.c b/source/blender/imbuf/intern/rectop.c index 446833ccf3b..958070c1479 100644 --- a/source/blender/imbuf/intern/rectop.c +++ b/source/blender/imbuf/intern/rectop.c @@ -138,7 +138,7 @@ static void blend_color_add_alpha(char cp[4], const char cp1[4], const char cp2[ cp[0] = cp1[0]; cp[1] = cp1[1]; cp[2] = cp1[2]; - cp[3] = (temp < 0) ? 0 : temp; + cp[3] = (temp > 255)? 255 : ((temp < 0) ? 0 : temp); } @@ -269,6 +269,7 @@ static void blend_color_add_alpha_float(float cp[4], const float cp1[4], const f cp[3] = (cp1[3] + fac * cp2[3]); if (cp[3] < 0.0f) cp[3] = 0.0f; + if (cp[3] > 1.0f) cp[3] = 1.0f; } void IMB_blend_color_float(float *dst, float *src1, float *src2, float fac, IMB_BlendMode mode) |