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:
authorJeroen Bakker <jbakker>2020-09-22 14:52:38 +0300
committerJeroen Bakker <jeroen@blender.org>2020-09-22 14:52:54 +0300
commitb17cca6966dd06be5fc66a5c1ece79bbfe6b39b7 (patch)
treee20f5dd7e5ff083013759d1c942a0397d7ea788d /source/blender/draw
parent085329f114beb904ed3ef0c8ec6894ee26916704 (diff)
Fix T81026: Image Editor: Alpha (like Bloom) not showing properly
With the new image editor drawing there were was some mutual exclusive functionality. When rendering the alpha was shown correctly or the pure emissive colors were shown correctly, but never both. The cause of this is that the image_gpu did not used the correct alpha mode when generating gpu textures for non-images (render results, compositors viewer) The implementation always checked the alpha_mode. Alpha mode is an attribute for images, but aren't set for non images. This patch adds a more detailed check to ensure that the gpu texture is premultiplied. The issue has been tested using several bug report files and production files. Reviewed By: Brecht van Lommel Differential Revision: https://developer.blender.org/D8978
Diffstat (limited to 'source/blender/draw')
-rw-r--r--source/blender/draw/engines/image/image_engine.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/draw/engines/image/image_engine.c b/source/blender/draw/engines/image/image_engine.c
index 2f380619c2c..3d767f911fa 100644
--- a/source/blender/draw/engines/image/image_engine.c
+++ b/source/blender/draw/engines/image/image_engine.c
@@ -138,7 +138,7 @@ static void image_cache_image(IMAGE_Data *vedata, Image *image, ImageUser *iuser
far_near[0] = ((Camera *)scene->camera->data)->clip_end;
}
- const bool use_premul_alpha = image->alpha_mode == IMA_ALPHA_PREMUL;
+ const bool use_premul_alpha = BKE_image_has_gpu_texture_premultiplied_alpha(image, ibuf);
const bool is_tiled_texture = tex_tile_data != NULL;
const bool do_repeat = (!is_tiled_texture) && ((sima->flag & SI_DRAW_TILE) != 0);