mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-28 13:21:10 +00:00
Remove (redundant?) skywalls that seemed to drop performance
This commit is contained in:
parent
e8d2ca1f63
commit
35a8944f88
1 changed files with 0 additions and 152 deletions
|
@ -974,111 +974,6 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
||||||
worldlow = gr_backsector->floorheight;
|
worldlow = gr_backsector->floorheight;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Sky culling
|
|
||||||
if (!gr_curline->polyseg) // Don't do it for polyobjects
|
|
||||||
{
|
|
||||||
// Sky Ceilings
|
|
||||||
wallVerts[3].y = wallVerts[2].y = FIXED_TO_FLOAT(INT32_MAX);
|
|
||||||
|
|
||||||
if (gr_frontsector->ceilingpic == skyflatnum)
|
|
||||||
{
|
|
||||||
if (gr_backsector->ceilingpic == skyflatnum)
|
|
||||||
{
|
|
||||||
// Both front and back sectors are sky, needs skywall from the frontsector's ceiling, but only if the
|
|
||||||
// backsector is lower
|
|
||||||
if ((worldhigh <= worldtop)
|
|
||||||
#ifdef ESLOPE
|
|
||||||
&& (worldhighslope <= worldtopslope)
|
|
||||||
#endif
|
|
||||||
)
|
|
||||||
{
|
|
||||||
#ifdef ESLOPE
|
|
||||||
wallVerts[0].y = FIXED_TO_FLOAT(worldhigh);
|
|
||||||
wallVerts[1].y = FIXED_TO_FLOAT(worldhighslope);
|
|
||||||
#else
|
|
||||||
wallVerts[0].y = wallVerts[1].y = FIXED_TO_FLOAT(worldhigh);
|
|
||||||
#endif
|
|
||||||
HWR_DrawSkyWall(wallVerts, &Surf, 0, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Only the frontsector is sky, just draw a skywall from the front ceiling
|
|
||||||
#ifdef ESLOPE
|
|
||||||
wallVerts[0].y = FIXED_TO_FLOAT(worldtop);
|
|
||||||
wallVerts[1].y = FIXED_TO_FLOAT(worldtopslope);
|
|
||||||
#else
|
|
||||||
wallVerts[0].y = wallVerts[1].y = FIXED_TO_FLOAT(worldtop);
|
|
||||||
#endif
|
|
||||||
HWR_DrawSkyWall(wallVerts, &Surf, 0, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (gr_backsector->ceilingpic == skyflatnum)
|
|
||||||
{
|
|
||||||
// Only the backsector is sky, just draw a skywall from the front ceiling
|
|
||||||
#ifdef ESLOPE
|
|
||||||
wallVerts[0].y = FIXED_TO_FLOAT(worldtop);
|
|
||||||
wallVerts[1].y = FIXED_TO_FLOAT(worldtopslope);
|
|
||||||
#else
|
|
||||||
wallVerts[0].y = wallVerts[1].y = FIXED_TO_FLOAT(worldtop);
|
|
||||||
#endif
|
|
||||||
HWR_DrawSkyWall(wallVerts, &Surf, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Sky Floors
|
|
||||||
wallVerts[0].y = wallVerts[1].y = FIXED_TO_FLOAT(INT32_MIN);
|
|
||||||
|
|
||||||
if (gr_frontsector->floorpic == skyflatnum)
|
|
||||||
{
|
|
||||||
if (gr_backsector->floorpic == skyflatnum)
|
|
||||||
{
|
|
||||||
// Both front and back sectors are sky, needs skywall from the backsector's floor, but only if the
|
|
||||||
// it's higher, also needs to check for bottomtexture as the floors don't usually move down
|
|
||||||
// when both sides are sky floors
|
|
||||||
if ((worldlow >= worldbottom)
|
|
||||||
#ifdef ESLOPE
|
|
||||||
&& (worldlowslope >= worldbottomslope)
|
|
||||||
#endif
|
|
||||||
&& !(gr_sidedef->bottomtexture))
|
|
||||||
{
|
|
||||||
#ifdef ESLOPE
|
|
||||||
wallVerts[3].y = FIXED_TO_FLOAT(worldlow);
|
|
||||||
wallVerts[2].y = FIXED_TO_FLOAT(worldlowslope);
|
|
||||||
#else
|
|
||||||
wallVerts[3].y = wallVerts[2].y = FIXED_TO_FLOAT(worldlow);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
HWR_DrawSkyWall(wallVerts, &Surf, 0, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Only the backsector has sky, just draw a skywall from the back floor
|
|
||||||
#ifdef ESLOPE
|
|
||||||
wallVerts[3].y = FIXED_TO_FLOAT(worldbottom);
|
|
||||||
wallVerts[2].y = FIXED_TO_FLOAT(worldbottomslope);
|
|
||||||
#else
|
|
||||||
wallVerts[3].y = wallVerts[2].y = FIXED_TO_FLOAT(worldbottom);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
HWR_DrawSkyWall(wallVerts, &Surf, 0, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if ((gr_backsector->floorpic == skyflatnum) && !(gr_sidedef->bottomtexture))
|
|
||||||
{
|
|
||||||
// Only the backsector has sky, just draw a skywall from the back floor if there's no bottomtexture
|
|
||||||
#ifdef ESLOPE
|
|
||||||
wallVerts[3].y = FIXED_TO_FLOAT(worldlow);
|
|
||||||
wallVerts[2].y = FIXED_TO_FLOAT(worldlowslope);
|
|
||||||
#else
|
|
||||||
wallVerts[3].y = wallVerts[2].y = FIXED_TO_FLOAT(worldlow);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
HWR_DrawSkyWall(wallVerts, &Surf, 0, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// hack to allow height changes in outdoor areas
|
// hack to allow height changes in outdoor areas
|
||||||
// This is what gets rid of the upper textures if there should be sky
|
// This is what gets rid of the upper textures if there should be sky
|
||||||
if (gr_frontsector->ceilingpic == skyflatnum &&
|
if (gr_frontsector->ceilingpic == skyflatnum &&
|
||||||
|
@ -1671,53 +1566,6 @@ void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom
|
||||||
HWR_ProjectWall(wallVerts, &Surf, PF_Masked, lightnum, colormap);
|
HWR_ProjectWall(wallVerts, &Surf, PF_Masked, lightnum, colormap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
#ifdef ESLOPE
|
|
||||||
//Set textures properly on single sided walls that are sloped
|
|
||||||
wallVerts[3].y = FIXED_TO_FLOAT(worldtop);
|
|
||||||
wallVerts[0].y = FIXED_TO_FLOAT(worldbottom);
|
|
||||||
wallVerts[2].y = FIXED_TO_FLOAT(worldtopslope);
|
|
||||||
wallVerts[1].y = FIXED_TO_FLOAT(worldbottomslope);
|
|
||||||
#else
|
|
||||||
// set top/bottom coords
|
|
||||||
wallVerts[2].y = wallVerts[3].y = FIXED_TO_FLOAT(worldtop);
|
|
||||||
wallVerts[0].y = wallVerts[1].y = FIXED_TO_FLOAT(worldbottom);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// When there's no midtexture, draw a skywall to prevent rendering behind it
|
|
||||||
HWR_DrawSkyWall(wallVerts, &Surf, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Single sided lines are simple for skywalls, just need to draw from the top or bottom of the sector if there's
|
|
||||||
// a sky flat
|
|
||||||
if (!gr_curline->polyseg)
|
|
||||||
{
|
|
||||||
if (gr_frontsector->ceilingpic == skyflatnum) // It's a single-sided line with sky for its sector
|
|
||||||
{
|
|
||||||
wallVerts[3].y = wallVerts[2].y = FIXED_TO_FLOAT(INT32_MAX);
|
|
||||||
#ifdef ESLOPE
|
|
||||||
wallVerts[0].y = FIXED_TO_FLOAT(worldtop);
|
|
||||||
wallVerts[1].y = FIXED_TO_FLOAT(worldtopslope);
|
|
||||||
#else
|
|
||||||
wallVerts[0].y = wallVerts[1].y = FIXED_TO_FLOAT(worldtop);
|
|
||||||
#endif
|
|
||||||
HWR_DrawSkyWall(wallVerts, &Surf, 0, 0);
|
|
||||||
}
|
|
||||||
if (gr_frontsector->floorpic == skyflatnum)
|
|
||||||
{
|
|
||||||
#ifdef ESLOPE
|
|
||||||
wallVerts[3].y = FIXED_TO_FLOAT(worldbottom);
|
|
||||||
wallVerts[2].y = FIXED_TO_FLOAT(worldbottomslope);
|
|
||||||
#else
|
|
||||||
wallVerts[3].y = wallVerts[2].y = FIXED_TO_FLOAT(worldbottom);
|
|
||||||
#endif
|
|
||||||
wallVerts[0].y = wallVerts[1].y = FIXED_TO_FLOAT(INT32_MIN);
|
|
||||||
|
|
||||||
HWR_DrawSkyWall(wallVerts, &Surf, 0, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue