mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-12-01 16:41:22 +00:00
-looks like we still need this...
This commit is contained in:
parent
52056a05bd
commit
8ae97bc3e1
1 changed files with 34 additions and 0 deletions
|
@ -419,6 +419,40 @@ static float gl_GetFogDensity(int lightlevel, PalEntry fogcolor)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//==========================================================================
|
||||||
|
//
|
||||||
|
// Check fog by current lighting info
|
||||||
|
//
|
||||||
|
//==========================================================================
|
||||||
|
|
||||||
|
bool gl_CheckFog(FColormap *cm, int lightlevel)
|
||||||
|
{
|
||||||
|
// Check for fog boundaries. This needs a few more checks for the sectors
|
||||||
|
bool frontfog;
|
||||||
|
|
||||||
|
PalEntry fogcolor = cm->FadeColor;
|
||||||
|
|
||||||
|
if ((fogcolor.d & 0xffffff) == 0)
|
||||||
|
{
|
||||||
|
frontfog = false;
|
||||||
|
}
|
||||||
|
else if (outsidefogdensity != 0 && outsidefogcolor.a!=0xff && (fogcolor.d & 0xffffff) == (outsidefogcolor.d & 0xffffff))
|
||||||
|
{
|
||||||
|
frontfog = true;
|
||||||
|
}
|
||||||
|
else if (fogdensity!=0 || (glset.lightmode & 4))
|
||||||
|
{
|
||||||
|
// case 3: level has fog density set
|
||||||
|
frontfog = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// case 4: use light level
|
||||||
|
frontfog = lightlevel < 248;
|
||||||
|
}
|
||||||
|
return frontfog;
|
||||||
|
}
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
//
|
//
|
||||||
// Check if the current linedef is a candidate for a fog boundary
|
// Check if the current linedef is a candidate for a fog boundary
|
||||||
|
|
Loading…
Reference in a new issue