mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 15:21:51 +00:00
- fixed: application of fake contrast should never result in a light level of 0 unless the sector's own light level is 0.
This commit is contained in:
parent
f61150a75e
commit
33f8b697ce
1 changed files with 3 additions and 2 deletions
|
@ -87,7 +87,7 @@ int HWDrawInfo::CalcLightLevel(int lightlevel, int rellight, bool weapon, int bl
|
|||
{
|
||||
int light;
|
||||
|
||||
if (lightlevel == 0) return 0;
|
||||
if (lightlevel <= 0) return 0;
|
||||
|
||||
bool darklightmode = (isDarkLightMode()) || (isSoftwareLighting() && blendfactor > 0);
|
||||
|
||||
|
@ -116,7 +116,8 @@ int HWDrawInfo::CalcLightLevel(int lightlevel, int rellight, bool weapon, int bl
|
|||
light=lightlevel+rellight;
|
||||
}
|
||||
|
||||
return clamp(light, 0, 255);
|
||||
// Fake contrast should never turn a positive value into 0.
|
||||
return clamp(light, 1, 255);
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
|
|
Loading…
Reference in a new issue