- use symbolic constants for the light modes.
This commit is contained in:
parent
15949102da
commit
1187906a61
10 changed files with 62 additions and 34 deletions
|
|
@ -127,7 +127,7 @@ void FRenderState::SetFog(int lightlevel, int rellight, bool fullbright, const F
|
|||
}
|
||||
else
|
||||
{
|
||||
if ((level.lightmode == 2 || (level.lightmode >= 8 && cmap->BlendFactor > 0)) && fogcolor == 0)
|
||||
if ((level.lightmode == ELightMode::Doom || (level.isSoftwareLighting() && cmap->BlendFactor > 0)) && fogcolor == 0)
|
||||
{
|
||||
float light = (float)hw_CalcLightLevel(lightlevel, rellight, false, cmap->BlendFactor);
|
||||
SetShaderLight(light, lightlevel);
|
||||
|
|
@ -148,7 +148,7 @@ void FRenderState::SetFog(int lightlevel, int rellight, bool fullbright, const F
|
|||
SetFog(fogcolor, fogdensity);
|
||||
|
||||
// Korshun: fullbright fog like in software renderer.
|
||||
if (level.lightmode >= 8 && cmap->BlendFactor == 0 && level.brightfog && fogdensity != 0 && fogcolor != 0)
|
||||
if (level.isSoftwareLighting() && cmap->BlendFactor == 0 && level.brightfog && fogdensity != 0 && fogcolor != 0)
|
||||
{
|
||||
SetSoftLightLevel(255);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue