- brighten the textured automap when in the hardware renderer with light modes 0, 1 and 4.

This commit is contained in:
Christoph Oelckers 2018-04-15 08:53:38 +02:00
parent 515323dcbd
commit 35596dbbc4

View file

@ -30,6 +30,7 @@
#include "templates.h"
#include "r_utility.h"
#include "v_video.h"
#include "g_levellocals.h"
EXTERN_CVAR(Float, transsouls)
@ -324,6 +325,11 @@ void F2DDrawer::AddPoly(FTexture *texture, FVector2 *points, int npoints,
// is necessary in order to best reproduce Doom's original lighting.
double map = (NUMCOLORMAPS * 2.) - ((lightlevel + 12) * (NUMCOLORMAPS / 128.));
double fadelevel = clamp((map - 12) / NUMCOLORMAPS, 0.0, 1.0);
// handle the brighter light modes of the hardware renderer.
if (vid_rendermode == 4 && (level.lightmode < 2 || level.lightmode == 4))
{
fadelevel = pow(fadelevel, 1.3);
}
RenderCommand poly;