From b17cca6966dd06be5fc66a5c1ece79bbfe6b39b7 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Tue, 22 Sep 2020 13:52:38 +0200 Subject: 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 --- source/blender/blenkernel/BKE_image.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenkernel/BKE_image.h') diff --git a/source/blender/blenkernel/BKE_image.h b/source/blender/blenkernel/BKE_image.h index 725f19b1ce2..369ddc444b6 100644 --- a/source/blender/blenkernel/BKE_image.h +++ b/source/blender/blenkernel/BKE_image.h @@ -382,7 +382,7 @@ struct GPUTexture *BKE_image_get_gpu_tiles(struct Image *image, struct GPUTexture *BKE_image_get_gpu_tilemap(struct Image *image, struct ImageUser *iuser, struct ImBuf *ibuf); - +bool BKE_image_has_gpu_texture_premultiplied_alpha(struct Image *image, struct ImBuf *ibuf); void BKE_image_update_gputexture( struct Image *ima, struct ImageUser *iuser, int x, int y, int w, int h); void BKE_image_paint_set_mipmap(struct Main *bmain, bool mipmap); -- cgit v1.2.3