- fixed the use of Doom-Legacy-style 3D floor lighting in light mode 8.

Legacy used some strange blending formula to calculate its colormaps for colored 3D floor lighting, this is not available in the software lighting mode, so for these the engine has to temporarily revert to light mode 2 to render them correctly.
This commit is contained in:
Christoph Oelckers 2018-09-08 13:08:04 +02:00
commit 1c3d4b46c6
7 changed files with 29 additions and 22 deletions

View file

@ -428,6 +428,7 @@ void F2DDrawer::AddPoly(FTexture *texture, FVector2 *points, int npoints,
// is necessary in order to best reproduce Doom's original lighting.
double fadelevel;
// The hardware renderer's light modes 0, 1 and 4 use a linear light scale which must be used here as well. Otherwise the automap gets too dark.
if (vid_rendermode != 4 || (level.lightmode >= 2 && level.lightmode != 4))
{
double map = (NUMCOLORMAPS * 2.) - ((lightlevel + 12) * (NUMCOLORMAPS / 128.));