mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
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:
parent
e999e2058c
commit
d3994b0801
1 changed files with 11 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue