mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 23:01:59 +00:00
- fixed weapon sprite light calculation for low light levels.
This commit is contained in:
parent
b50123ec6b
commit
977d5988c5
1 changed files with 2 additions and 2 deletions
|
@ -244,7 +244,7 @@ void GLSceneDrawer::DrawPlayerSprites(sector_t * viewsector, bool hudModelStep)
|
|||
}
|
||||
else
|
||||
{
|
||||
fakesec = gl_FakeFlat(viewsector, &fs, in_area, false);
|
||||
fakesec = gl_FakeFlat(viewsector, &fs, in_area, false);
|
||||
|
||||
// calculate light level for weapon sprites
|
||||
lightlevel = gl_ClampLight(fakesec->lightlevel);
|
||||
|
@ -282,7 +282,7 @@ void GLSceneDrawer::DrawPlayerSprites(sector_t * viewsector, bool hudModelStep)
|
|||
|
||||
lightlevel = gl_CalcLightLevel(lightlevel, getExtraLight(), true);
|
||||
|
||||
if (glset.lightmode == 8)
|
||||
if (glset.lightmode == 8 || lightlevel < 92)
|
||||
{
|
||||
// Korshun: the way based on max possible light level for sector like in software renderer.
|
||||
float min_L = 36.0 / 31.0 - ((lightlevel / 255.0) * (63.0 / 31.0)); // Lightlevel in range 0-63
|
||||
|
|
Loading…
Reference in a new issue