- reinstated rendering of mid textures over two-sided wall portals.

This was removed in the last PR due to z-fighting problems which now have also been addressed
This commit is contained in:
Christoph Oelckers 2021-03-05 12:25:41 +01:00
parent a15216c90f
commit 0c0ef4f938
2 changed files with 12 additions and 1 deletions

View file

@ -49,7 +49,7 @@ void HWDrawInfo::AddWall(HWWall *wall)
bool masked = HWWall::passflag[wall->type] == 1 ? false : (wall->texture && wall->texture->isMasked());
int list;
if ((wall->flags & HWWall::HWF_SKYHACK && wall->type == RENDERWALL_M2S))
if (wall->flags & HWWall::HWF_SKYHACK && wall->type == RENDERWALL_M2S)
{
list = GLDL_MASKEDWALLSOFS;
}

View file

@ -1443,6 +1443,11 @@ void HWWall::DoMidTexture(HWDrawInfo *di, seg_t * seg, bool drawfogboundary,
tci.mScale.Y = -tci.mScale.Y;
flags |= HWF_NOSLICE;
}
if (seg->linedef->isVisualPortal())
{
// mid textures on portal lines need the same offsetting as mid textures on sky lines
flags |= HWF_SKYHACK;
}
SetWallCoordinates(seg, &tci, texturetop, topleft, topright, bottomleft, bottomright, t_ofs);
//
@ -2165,6 +2170,12 @@ void HWWall::Process(HWDrawInfo *di, seg_t *seg, sector_t * frontsector, sector_
zbottom[0] = bfh1;
zbottom[1] = bfh2;
PutPortal(di, PORTALTYPE_LINETOLINE, -1);
if (texture && seg->backsector != nullptr)
{
DoMidTexture(di, seg, drawfogboundary, frontsector, backsector, realfront, realback,
fch1, fch2, ffh1, ffh2, bch1, bch2, bfh1, bfh2);
}
}
else
{