- fixed: vertically mirrored textures should not be subjected to empty space optimizations because the algorithm cannot deal with the inverted case.

This commit is contained in:
Christoph Oelckers 2020-06-03 22:30:44 +02:00
parent 87d81656e1
commit fd3845ce09
2 changed files with 6 additions and 4 deletions

View file

@ -128,7 +128,8 @@ public:
HWF_NOSPLITUPPER=16,
HWF_NOSPLITLOWER=32,
HWF_NOSPLIT=64,
HWF_TRANSLUCENT = 128
HWF_TRANSLUCENT = 128,
HWF_NOSLICE = 256
};
enum
@ -164,9 +165,9 @@ public:
float ViewDistance;
int lightlevel;
short lightlevel;
uint16_t flags;
uint8_t type;
uint8_t flags;
short rellight;
float topglowcolor[4];

View file

@ -1404,6 +1404,7 @@ void HWWall::DoMidTexture(HWDrawInfo *di, seg_t * seg, bool drawfogboundary,
{
tci.mRenderHeight = -tci.mRenderHeight;
tci.mScale.Y = -tci.mScale.Y;
flags |= HWF_NOSLICE;
}
SetWallCoordinates(seg, &tci, texturetop, topleft, topright, bottomleft, bottomright, t_ofs);
@ -1464,7 +1465,7 @@ void HWWall::DoMidTexture(HWDrawInfo *di, seg_t * seg, bool drawfogboundary,
FloatRect *splitrect;
int v = texture->GetAreas(&splitrect);
if (seg->frontsector == seg->backsector) flags |= HWF_NOSPLIT; // we don't need to do vertex splits if a line has both sides in the same sector
if (v>0 && !drawfogboundary && !(seg->linedef->flags&ML_WRAP_MIDTEX))
if (v>0 && !drawfogboundary && !(seg->linedef->flags&ML_WRAP_MIDTEX) && !(flags & HWF_NOSLICE))
{
// split the poly!
int i,t=0;