mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-14 20:00:49 +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;
|
int picnum = plane == plane_ceiling ? sector->ceilingpicnum : sector->floorpicnum;
|
||||||
tileUpdatePicnum(&picnum, 0, 0);
|
tileUpdatePicnum(&picnum, 0, 0);
|
||||||
|
@ -80,7 +80,11 @@ void initSkyInfo(HWDrawInfo *di, HWSkyInfo* sky, sectortype* sector, int plane,
|
||||||
sky->y_offset = ypanning;
|
sky->y_offset = ypanning;
|
||||||
sky->x_offset = 2 * xpanning / (1 << (realskybits - dapskybits));
|
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->shade = 0;// clamp(plane == plane_ceiling ? sector->ceilingshade : sector->floorshade, 0, numshades - 1);
|
||||||
sky->texture = skytex;
|
sky->texture = skytex;
|
||||||
}
|
}
|
||||||
|
@ -114,9 +118,7 @@ void HWWall::SkyPlane(HWDrawInfo *di, sectortype *sector, int plane, bool allowr
|
||||||
{
|
{
|
||||||
ptype = PORTALTYPE_SKY;
|
ptype = PORTALTYPE_SKY;
|
||||||
HWSkyInfo skyinfo;
|
HWSkyInfo skyinfo;
|
||||||
PalEntry pe = GlobalMapFog? GlobalMapFog : fade;
|
initSkyInfo(di, &skyinfo, sector, plane);
|
||||||
pe.a = 230;
|
|
||||||
initSkyInfo(di, &skyinfo, sector, plane, pe);
|
|
||||||
ptype = PORTALTYPE_SKY;
|
ptype = PORTALTYPE_SKY;
|
||||||
sky = &skyinfo;
|
sky = &skyinfo;
|
||||||
PutPortal(di, ptype, plane);
|
PutPortal(di, ptype, plane);
|
||||||
|
|
Loading…
Reference in a new issue