[Bf-blender-cvs] [01cdd22] master: Fix alpha blending w/ font drawing & byte buffer
Campbell Barton
noreply at git.blender.org
Wed Apr 27 07:46:40 CEST 2016
Commit: 01cdd22a524b0f4a51d52d661268eb3758c68f35
Author: Campbell Barton
Date: Wed Apr 27 15:47:49 2016 +1000
Branches: master
https://developer.blender.org/rB01cdd22a524b0f4a51d52d661268eb3758c68f35
Fix alpha blending w/ font drawing & byte buffer
===================================================================
M source/blender/blenfont/intern/blf_font.c
===================================================================
diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c
index 7c6bef5..dfebaec 100644
--- a/source/blender/blenfont/intern/blf_font.c
+++ b/source/blender/blenfont/intern/blf_font.c
@@ -411,7 +411,7 @@ static void blf_font_draw_buffer_ex(
cbuf[0] = (unsigned char)((b_col_char[0] * a) + (cbuf[0] * (1.0f - a)));
cbuf[1] = (unsigned char)((b_col_char[1] * a) + (cbuf[1] * (1.0f - a)));
cbuf[2] = (unsigned char)((b_col_char[2] * a) + (cbuf[2] * (1.0f - a)));
- cbuf[3] = (unsigned char)((alphatest = ((int)cbuf[3] + (int)(a * 255)) < 255) ?
+ cbuf[3] = (unsigned char)(((alphatest = ((int)cbuf[3] + (int)(a * 255))) < 255) ?
alphatest : 255);
}
}
More information about the Bf-blender-cvs
mailing list