Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-01-02 22:10:48 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-01-02 22:11:10 +0300
commit7e7657da2956f90c381a9bff01ce1b68d50bb89c (patch)
tree7e89fbca8a418fad63adfbb67b78fb00de7766ab /source/blender/editors/interface/interface_icons.c
parent017573495e36e3a2277a1da1ab8febc7f9c2d973 (diff)
Fix wrong alpha blending for datablock preview icons.
Diffstat (limited to 'source/blender/editors/interface/interface_icons.c')
-rw-r--r--source/blender/editors/interface/interface_icons.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface_icons.c b/source/blender/editors/interface/interface_icons.c
index 24a12950bad..a077a91a4b9 100644
--- a/source/blender/editors/interface/interface_icons.c
+++ b/source/blender/editors/interface/interface_icons.c
@@ -1602,9 +1602,8 @@ static void icon_draw_size(
/* no create icon on this level in code */
if (!pi->rect[size]) return; /* something has gone wrong! */
- /* preview images use premul alpha ... */
- GPU_blend_set_func_separate(GPU_SRC_ALPHA, GPU_ONE_MINUS_SRC_ALPHA, GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA);
-
+ /* Preview images use premultiplied alpha. */
+ GPU_blend_set_func_separate(GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA, GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA);
icon_draw_rect(x, y, w, h, aspect, pi->w[size], pi->h[size], pi->rect[size], alpha, rgb, desaturate);
GPU_blend_set_func_separate(GPU_SRC_ALPHA, GPU_ONE_MINUS_SRC_ALPHA, GPU_ONE, GPU_ONE_MINUS_SRC_ALPHA);
}