[Bf-blender-cvs] [29f923b27c5] master: Fix T83557: Alpha blend + emissive colors renders white artifacts

Jeroen Bakker noreply at git.blender.org
Wed Dec 16 13:57:32 CET 2020


Commit: 29f923b27c5c0a183791a2a97e80c5f469a4ef51
Author: Jeroen Bakker
Date:   Wed Dec 16 13:54:02 2020 +0100
Branches: master
https://developer.blender.org/rB29f923b27c5c0a183791a2a97e80c5f469a4ef51

Fix T83557: Alpha blend + emissive colors renders white artifacts

Issue was that not all code paths were taken to determine if
the GPU Texture was premultiplied or not. In this case the result
was set to unpremultiplied what is incorrect.

This fixes broken test case image alpha blend from image_colorspace.

===================================================================

M	source/blender/blenkernel/intern/image_gpu.c

===================================================================

diff --git a/source/blender/blenkernel/intern/image_gpu.c b/source/blender/blenkernel/intern/image_gpu.c
index 9ed233ab34c..50138b34fa3 100644
--- a/source/blender/blenkernel/intern/image_gpu.c
+++ b/source/blender/blenkernel/intern/image_gpu.c
@@ -62,7 +62,7 @@ bool BKE_image_has_gpu_texture_premultiplied_alpha(Image *image, ImBuf *ibuf)
       return ibuf->rect_float != NULL;
     }
   }
-  else if (ibuf) {
+  if (ibuf) {
     if (ibuf->rect_float) {
       return image ? (image->alpha_mode != IMA_ALPHA_STRAIGHT) : false;
     }



More information about the Bf-blender-cvs mailing list