From 967b12060cb6ebda75d216e0ffbb02c5ca7340a5 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 6 Dec 2013 20:08:37 +0600 Subject: Alpha channel of a plane track image works fine in MCE now --- source/blender/editors/space_clip/clip_draw.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/space_clip') diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c index 3ca9a9478fa..79607163913 100644 --- a/source/blender/editors/space_clip/clip_draw.c +++ b/source/blender/editors/space_clip/clip_draw.c @@ -1101,13 +1101,15 @@ static void draw_plane_marker_image(Scene *scene, {0.0f, 1.0f}}; float perspective_matrix[3][3]; float gl_matrix[4][4]; + bool transparent = false; BKE_tracking_homography_between_two_quads(frame_corners, plane_marker->corners, perspective_matrix); homogeneous_2d_to_gl_matrix(perspective_matrix, gl_matrix); - if (plane_track->image_opacity != 1.0f) { + if (plane_track->image_opacity != 1.0f || ibuf->planes == 32) { + transparent = true; glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); } @@ -1142,7 +1144,7 @@ static void draw_plane_marker_image(Scene *scene, glBindTexture(GL_TEXTURE_2D, last_texid); glDisable(GL_TEXTURE_2D); - if (plane_track->image_opacity != 1.0f) { + if (transparent) { glDisable(GL_BLEND); } } -- cgit v1.2.3