mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
- fixed new renderer's use of fog on skies: The palette value from the wall was used instead of the one from the sky plane.
This commit is contained in:
parent
8fae793341
commit
2e9732ce79
1 changed files with 7 additions and 5 deletions
|
@ -40,7 +40,7 @@ FGameTexture* SkyboxReplacement(FTextureID picnum, int palnum);
|
|||
//
|
||||
//==========================================================================
|
||||
|
||||
void initSkyInfo(HWDrawInfo *di, HWSkyInfo* sky, sectortype* sector, int plane, PalEntry FadeColor)
|
||||
void initSkyInfo(HWDrawInfo *di, HWSkyInfo* sky, sectortype* sector, int plane)
|
||||
{
|
||||
int picnum = plane == plane_ceiling ? sector->ceilingpicnum : sector->floorpicnum;
|
||||
tileUpdatePicnum(&picnum, 0, 0);
|
||||
|
@ -80,7 +80,11 @@ void initSkyInfo(HWDrawInfo *di, HWSkyInfo* sky, sectortype* sector, int plane,
|
|||
sky->y_offset = ypanning;
|
||||
sky->x_offset = 2 * xpanning / (1 << (realskybits - dapskybits));
|
||||
}
|
||||
sky->fadecolor = FadeColor;
|
||||
|
||||
PalEntry pe = GlobalMapFog ? GlobalMapFog : lookups.getFade(palette);
|
||||
pe.a = 230;
|
||||
|
||||
sky->fadecolor = pe;
|
||||
sky->shade = 0;// clamp(plane == plane_ceiling ? sector->ceilingshade : sector->floorshade, 0, numshades - 1);
|
||||
sky->texture = skytex;
|
||||
}
|
||||
|
@ -114,9 +118,7 @@ void HWWall::SkyPlane(HWDrawInfo *di, sectortype *sector, int plane, bool allowr
|
|||
{
|
||||
ptype = PORTALTYPE_SKY;
|
||||
HWSkyInfo skyinfo;
|
||||
PalEntry pe = GlobalMapFog? GlobalMapFog : fade;
|
||||
pe.a = 230;
|
||||
initSkyInfo(di, &skyinfo, sector, plane, pe);
|
||||
initSkyInfo(di, &skyinfo, sector, plane);
|
||||
ptype = PORTALTYPE_SKY;
|
||||
sky = &skyinfo;
|
||||
PutPortal(di, ptype, plane);
|
||||
|
|
Loading…
Reference in a new issue