diff --git a/source/core/rendering/scene/hw_flats.cpp b/source/core/rendering/scene/hw_flats.cpp index 7b2025381..c2236aa54 100644 --- a/source/core/rendering/scene/hw_flats.cpp +++ b/source/core/rendering/scene/hw_flats.cpp @@ -246,7 +246,6 @@ void HWFlat::ProcessSector(HWDrawInfo *di, sectortype * frontsector, int section float florz, ceilz; PlanesAtPoint(frontsector, float(vp.Pos.X) * 16.f, float(vp.Pos.Y) * -16.f, &ceilz, &florz); - fade = lookups.getFade(frontsector->floorpal); // fog is per sector. visibility = sectorVisibility(frontsector); sec = frontsector; section = section_; @@ -264,6 +263,7 @@ void HWFlat::ProcessSector(HWDrawInfo *di, sectortype * frontsector, int section { // process the original floor first. + fade = lookups.getFade(frontsector->floorpal); shade = frontsector->floorshade; palette = frontsector->floorpal; stack = frontsector->portalflags == PORTAL_SECTOR_FLOOR || frontsector->portalflags == PORTAL_SECTOR_FLOOR_REFLECT; @@ -304,6 +304,7 @@ void HWFlat::ProcessSector(HWDrawInfo *di, sectortype * frontsector, int section { // process the original ceiling first. + fade = lookups.getFade(frontsector->ceilingpal); shade = frontsector->ceilingshade; palette = frontsector->ceilingpal; stack = frontsector->portalflags == PORTAL_SECTOR_CEILING || frontsector->portalflags == PORTAL_SECTOR_CEILING_REFLECT; diff --git a/source/core/rendering/scene/hw_walls.cpp b/source/core/rendering/scene/hw_walls.cpp index 95875dd30..848c1c45d 100644 --- a/source/core/rendering/scene/hw_walls.cpp +++ b/source/core/rendering/scene/hw_walls.cpp @@ -952,7 +952,7 @@ void HWWall::Process(HWDrawInfo* di, walltype* wal, sectortype* frontsector, sec dynlightindex = -1; shade = wal->shade; palette = wal->pal; - fade = lookups.getFade(frontsector->floorpal); // fog is per sector. + fade = lookups.getFade(wal->pal); visibility = sectorVisibility(frontsector); alpha = 1.0f;