diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-08-13 02:50:21 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-08-13 02:50:21 +0400 |
commit | 10f631094c158ff2fdb49fc9236e699fb91ed015 (patch) | |
tree | deb75dc6d040ad4bae45994d34bf5e150e3b29a1 /source/blender/blenfont/intern/blf_font.c | |
parent | 866f986898cf6c35e8b4d5190853e453a3eb1714 (diff) |
fix [#32126] STAMP: Setting a background color causes color flicker
when rendering the sequencer can output float or char buffers which stamp wasn't accounting for.
Diffstat (limited to 'source/blender/blenfont/intern/blf_font.c')
-rw-r--r-- | source/blender/blenfont/intern/blf_font.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c index 97b88028868..dcefcc68d23 100644 --- a/source/blender/blenfont/intern/blf_font.c +++ b/source/blender/blenfont/intern/blf_font.c @@ -243,7 +243,7 @@ void blf_font_buffer(FontBLF *font, const char *str) blf_font_ensure_ascii_table(font); /* another buffer spesific call for color conversion */ - if (buf_info->is_linear) { + if (buf_info->do_color_management) { srgb_to_linearrgb_v4(b_col_float, buf_info->col); } else { @@ -304,9 +304,9 @@ void blf_font_buffer(FontBLF *font, const char *str) fbuf[3] = (alphatest = (fbuf[3] + (b_col_float[3]))) < 1.0f ? alphatest : 1.0f; } else { - fbuf[0] = (b_col_float[0] * a) + (fbuf[0] * (1 - a)); - fbuf[1] = (b_col_float[1] * a) + (fbuf[1] * (1 - a)); - fbuf[2] = (b_col_float[2] * a) + (fbuf[2] * (1 - a)); + fbuf[0] = (b_col_float[0] * a) + (fbuf[0] * (1.0f - a)); + fbuf[1] = (b_col_float[1] * a) + (fbuf[1] * (1.0f - a)); + fbuf[2] = (b_col_float[2] * a) + (fbuf[2] * (1.0f - a)); fbuf[3] = (alphatest = (fbuf[3] + (b_col_float[3] * a))) < 1.0f ? alphatest : 1.0f; } } |