mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 14:52:01 +00:00
- fixed SW shadows in new renderer.
shade clamping and full sprite sort was missing,
This commit is contained in:
parent
0ae93318e3
commit
18cf208b7d
6 changed files with 14 additions and 14 deletions
|
@ -591,7 +591,7 @@ inline int HWDrawList::CompareSprites(SortNode * a,SortNode * b)
|
|||
|
||||
if (s1->depth < s2->depth) return 1;
|
||||
if (s1->depth > s2->depth) return -1;
|
||||
return reverseSort? s2->index-s1->index : s1->index-s2->index;
|
||||
return s1->sprite->time - s2->sprite->time;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
|
@ -284,7 +284,7 @@ void HWFlat::ProcessSector(HWDrawInfo *di, sectortype * frontsector, int which)
|
|||
{
|
||||
// process the original floor first.
|
||||
|
||||
shade = frontsector->floorshade;
|
||||
shade = clamp(frontsector->floorshade, 0, numshades-1);
|
||||
palette = frontsector->floorpal;
|
||||
|
||||
//port = frontsector->ValidatePortal(sector_t::floor);
|
||||
|
@ -323,7 +323,7 @@ void HWFlat::ProcessSector(HWDrawInfo *di, sectortype * frontsector, int which)
|
|||
{
|
||||
// process the original ceiling first.
|
||||
|
||||
shade = frontsector->ceilingshade;
|
||||
shade = clamp(frontsector->ceilingshade, 0, numshades-1);
|
||||
palette = frontsector->ceilingpal;
|
||||
|
||||
|
||||
|
@ -371,7 +371,7 @@ void HWFlat::ProcessFlatSprite(HWDrawInfo* di, spritetype* sprite, sectortype* s
|
|||
{
|
||||
this->sprite = sprite;
|
||||
sec = sector;
|
||||
shade = sprite->shade;
|
||||
shade = clamp(sprite->shade, 0, numshades - 1);
|
||||
palette = sprite->pal;
|
||||
fade = lookups.getFade(sector[sprite->sectnum].floorpal); // fog is per sector.
|
||||
|
||||
|
|
|
@ -320,7 +320,7 @@ void HWSprite::Process(HWDrawInfo* di, spritetype* spr, sectortype* sector, int
|
|||
|
||||
modelframe = 0;
|
||||
dynlightindex = -1;
|
||||
shade = spr->shade;
|
||||
shade = clamp(spr->shade, 0, numshades-1);
|
||||
palette = spr->pal;
|
||||
fade = lookups.getFade(sector->floorpal); // fog is per sector.
|
||||
visibility = sectorVisibility(sector);
|
||||
|
|
|
@ -822,7 +822,7 @@ void HWWall::DoLowerTexture(HWDrawInfo* di, walltype* wal, sectortype* frontsect
|
|||
auto refwall = (wal->cstat & CSTAT_WALL_BOTTOM_SWAP) ? &wall[wal->nextwall] : wal;
|
||||
refheight = (refwall->cstat & CSTAT_WALL_ALIGN_BOTTOM) ? frontsector->ceilingz : backsector->floorz;
|
||||
|
||||
shade = refwall->shade;
|
||||
shade = clamp(refwall->shade, 0, numshades - 1);
|
||||
palette = refwall->pal;
|
||||
type = RENDERWALL_BOTTOM;
|
||||
DoTexture(di, wal, refwall, refheight, topleft, topright, bottomleft, bottomright);
|
||||
|
@ -922,7 +922,7 @@ void HWWall::Process(HWDrawInfo* di, walltype* wal, sectortype* frontsector, sec
|
|||
glseg.fracright = 1;
|
||||
flags = 0;
|
||||
dynlightindex = -1;
|
||||
shade = wal->shade;
|
||||
shade = clamp(wal->shade, 0, numshades - 1);
|
||||
palette = wal->pal;
|
||||
fade = lookups.getFade(frontsector->floorpal); // fog is per sector.
|
||||
visibility = sectorVisibility(frontsector);
|
||||
|
@ -1083,7 +1083,7 @@ void HWWall::ProcessWallSprite(HWDrawInfo* di, spritetype* spr, sectortype* sect
|
|||
|
||||
flags = 0;
|
||||
dynlightindex = -1;
|
||||
shade = spr->shade;
|
||||
shade = clamp(spr->shade, 0, numshades - 1);
|
||||
palette = spr->pal;
|
||||
fade = lookups.getFade(sector->floorpal); // fog is per sector.
|
||||
visibility = sectorVisibility(sector);
|
||||
|
|
|
@ -350,14 +350,14 @@ DoShadows(tspriteptr_t tsp, int viewz, int camang)
|
|||
New->clipdist |= TSPR_FLAGS_MDHACK;
|
||||
New->cstat |= 512;
|
||||
}
|
||||
else
|
||||
else if (!testnewrenderer)
|
||||
{
|
||||
int const camang = mirror ? NORM_ANGLE(2048 - Player[screenpeek].siang) : Player[screenpeek].siang;
|
||||
vec2_t const ofs = { bcos(camang, -11), bsin(camang, -11) };
|
||||
New->x += bcos(camang, -11);
|
||||
New->y += bsin(camang, -11);
|
||||
|
||||
New->x += ofs.x;
|
||||
New->y += ofs.y;
|
||||
}
|
||||
else New->time = 1;
|
||||
|
||||
// Check for voxel items and use a round generic pic if so
|
||||
//DoVoxelShadow(New);
|
||||
|
|
|
@ -1192,7 +1192,7 @@ void CollectPortals()
|
|||
}
|
||||
}
|
||||
}
|
||||
testnewrenderer = false;
|
||||
testnewrenderer = t;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue