diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-02-14 19:00:28 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-02-14 19:03:45 +0400 |
commit | 42946c37c789b5a57c45ff2637c79d194beb33d0 (patch) | |
tree | 2d12bd88cf5a17370d697fdc6cca99e5bacd4adc /source/blender/blenkernel/intern/colortools.c | |
parent | e1d9308616b00ebe350056258f56fe2775a085ed (diff) |
Fix T38606: C curve in the curve mapping compositing node not extrapolating correct.
The "premultiply" optimization here did not take the extrapolation into account.
Diffstat (limited to 'source/blender/blenkernel/intern/colortools.c')
-rw-r--r-- | source/blender/blenkernel/intern/colortools.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c index 76f610c0d79..e2cb0118e50 100644 --- a/source/blender/blenkernel/intern/colortools.c +++ b/source/blender/blenkernel/intern/colortools.c @@ -637,6 +637,11 @@ void curvemapping_premultiply(CurveMapping *cumap, int restore) MEM_freeN(cumap->cm[a].table); cumap->cm[a].table = cumap->cm[a].premultable; cumap->cm[a].premultable = NULL; + + copy_v2_v2(cumap->cm[a].ext_in, cumap->cm[a].premul_ext_in); + copy_v2_v2(cumap->cm[a].ext_out, cumap->cm[a].premul_ext_out); + zero_v2(cumap->cm[a].premul_ext_in); + zero_v2(cumap->cm[a].premul_ext_out); } cumap->flag &= ~CUMA_PREMULLED; @@ -662,6 +667,11 @@ void curvemapping_premultiply(CurveMapping *cumap, int restore) for (b = 0; b <= CM_TABLE; b++) { cumap->cm[a].table[b].y = curvemap_evaluateF(cumap->cm + 3, cumap->cm[a].table[b].y); } + + copy_v2_v2(cumap->cm[a].premul_ext_in, cumap->cm[a].ext_in); + copy_v2_v2(cumap->cm[a].premul_ext_out, cumap->cm[a].ext_out); + mul_v2_v2(cumap->cm[a].ext_in, cumap->cm[3].ext_in); + mul_v2_v2(cumap->cm[a].ext_out, cumap->cm[3].ext_out); } cumap->flag |= CUMA_PREMULLED; |