ref: 7763e5f0c8b7e7d67ea3e291a236fb2876ff702c
parent: 7616b2f22d8e090dcbea817aee2cd819bc41bda7
author: Sigrid Solveig Haflínudóttir <[email protected]>
date: Tue Nov 7 18:11:22 EST 2023
fences: don't modify z-buffer unless drawing as opaque
--- a/d_scan.c
+++ b/d_scan.c
@@ -220,9 +220,10 @@
#define WRITEFENCE(i) do{ \
fencepix = *(pbase + (s >> 16) + (t >> 16) * cachewidth); \
- if (pz[i] <= (izi >> 16) && fencepix != 255){ \
+ if (fencepix != 255 && pz[i] <= (izi >> 16)){ \
pdest[i] = blendalpha(fencepix, pdest[i], alpha); \
- pz[i] = (izi >> 16); \
+ if(alpha == 255) \
+ pz[i] = (izi >> 16); \
} \
izi += izistep; \
s += sstep; \