Revise polymost HOM issue workaround in Duke's E1L1. Add code to remove very thin spans.

This commit does not gain noticeable rendering performance, but at least should prevent weird polygon leakages
This commit is contained in:
nukeykt 2019-07-30 16:55:31 +09:00 committed by Christoph Oelckers
parent e999e2058c
commit d3994b0801

View file

@ -2850,6 +2850,9 @@ static void polymost_domost(float x0, float y0, float x1, float y1, float y0top
dm1.x = xbr;
}
dm0.x -= DOMOST_OFFSET;
dm1.x += DOMOST_OFFSET;
drawpoly_alpha = 0.f;
drawpoly_blend = 0;
@ -2923,6 +2926,14 @@ static void polymost_domost(float x0, float y0, float x1, float y1, float y0top
float const rdx = 1.f/dx;
for (bssize_t i = 0; i < scnt; i++)
{
if (spx[i] < x0)
spx[i] = x0;
else if (spx[i] > x1)
spx[i] = x1;
}
for (bssize_t z=0, vcnt=0; z<=scnt; z++,i=vcnt)
{
float t;