Skip to content

Commit

Permalink
- fixed: vertically mirrored textures should not be subjected to empt…
Browse files Browse the repository at this point in the history
…y space optimizations because the algorithm cannot deal with the inverted case.
  • Loading branch information
coelckers committed Jun 3, 2020
1 parent 87d8165 commit fd3845c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/rendering/hwrenderer/scene/hw_drawstructs.h
Expand Up @@ -128,7 +128,8 @@ class HWWall
HWF_NOSPLITUPPER=16,
HWF_NOSPLITLOWER=32,
HWF_NOSPLIT=64,
HWF_TRANSLUCENT = 128
HWF_TRANSLUCENT = 128,
HWF_NOSLICE = 256
};

enum
Expand Down Expand Up @@ -164,9 +165,9 @@ class HWWall

float ViewDistance;

int lightlevel;
short lightlevel;
uint16_t flags;
uint8_t type;
uint8_t flags;
short rellight;

float topglowcolor[4];
Expand Down
3 changes: 2 additions & 1 deletion src/rendering/hwrenderer/scene/hw_walls.cpp
Expand Up @@ -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);

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit fd3845c

Please sign in to comment.