ref: 959e7e5a7dc56def005d250db32e7421c5d940bd
parent: 3f06ec4dfff813a552325d52392abb20d450692d
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Sun Dec 17 20:06:45 EST 2023
blendalpha: fix fog with additive blending
--- a/d_local.h
+++ b/d_local.h
@@ -77,10 +77,11 @@
int a, b, c;
if(currententity != nil && currententity->effects & EF_ADDITIVE){
+ ca = R_BlendFog(ca, izi);
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 R_BlendFog((cb & 0xff000000) | min(a, 255) | min(b, 255)<<8 | min(c, 255)<<16, izi);
+ return (cb & 0xff000000) | min(a, 255) | min(b, 255)<<8 | min(c, 255)<<16;
}
return R_BlendFog(