diff options
-rw-r--r-- | source/blender/editors/space_image/image_draw.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c index 4f66506d28b..d2af26aa1d7 100644 --- a/source/blender/editors/space_image/image_draw.c +++ b/source/blender/editors/space_image/image_draw.c @@ -389,10 +389,12 @@ void ED_image_draw_info(Scene *scene, immRecti(pos, color_quater_x, color_quater_y, color_rect_half.xmax, color_rect_half.ymax); immRecti(pos, color_rect_half.xmin, color_rect_half.ymin, color_quater_x, color_quater_y); - GPU_blend(GPU_BLEND_ALPHA); - immUniformColor3fvAlpha(finalcol, fp ? fp[3] : (cp[3] / 255.0f)); - immRecti(pos, color_rect.xmin, color_rect.ymin, color_rect.xmax, color_rect.ymax); - GPU_blend(GPU_BLEND_NONE); + if (fp != NULL || cp != NULL) { + GPU_blend(GPU_BLEND_ALPHA); + immUniformColor3fvAlpha(finalcol, fp ? fp[3] : (cp[3] / 255.0f)); + immRecti(pos, color_rect.xmin, color_rect.ymin, color_rect.xmax, color_rect.ymax); + GPU_blend(GPU_BLEND_NONE); + } } else { immUniformColor3fv(finalcol); |