ref: 67e63b7e1b4b799192b3e9c8a9702e54c83b67d1
parent: c7cca52323edfc8c8792bc75829e853689bb94ec
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Sun Dec 17 19:05:16 EST 2023
blendalpha: leave dest color attributes
--- a/d_local.h
+++ b/d_local.h
@@ -82,10 +82,11 @@
a = (alpha*((ca>> 0)&0xff) + 255*((cb>> 0)&0xff))>> 8;
b = (alpha*((ca>> 8)&0xff) + 255*((cb>> 8)&0xff))>> 8;
c = (alpha*((ca>>16)&0xff) + 255*((cb>>16)&0xff))>> 8;
- return min(a, 255) | min(b, 255)<<8 | min(c, 255)<<16;
+ return (cb & 0xff000000) | min(a, 255) | min(b, 255)<<8 | min(c, 255)<<16;
}
return
+ (cb & 0xff000000) |
((alpha*((ca>> 0)&0xff) + (255-alpha)*((cb>> 0)&0xff))>> 8) << 0 |
((alpha*((ca>> 8)&0xff) + (255-alpha)*((cb>> 8)&0xff))>> 8) << 8 |
((alpha*((ca>>16)&0xff) + (255-alpha)*((cb>>16)&0xff))>> 8) << 16;