Merge remote-tracking branch 'origin/no-diminishing-light'

This commit is contained in:
Rachael Alexanderson 2017-03-06 13:47:33 -05:00
commit 5c3b9d81ad
2 changed files with 9 additions and 1 deletions

View file

@ -145,6 +145,11 @@ namespace swrenderer
FloorVisibility = 160.0 * FloorVisibility / viewport->FocalLengthY;
TiltVisibility = float(vis * FocalTangent * (16.f * 320.f) / viewwidth);
// Disable diminishing light (To do: make a cvar control this)
WallVisibility = 0.0;
FloorVisibility = 0.0;
TiltVisibility = 0.0f;
}
// Controls how quickly light ramps across a 1/z range. Set this, and it

View file

@ -32,7 +32,10 @@
// Convert a light level into an unbounded colormap index (shade). Result is
// fixed point. Why the +12? I wish I knew, but experimentation indicates it
// is necessary in order to best reproduce Doom's original lighting.
#define LIGHT2SHADE(l) ((NUMCOLORMAPS*2*FRACUNIT)-(((l)+12)*(FRACUNIT*NUMCOLORMAPS/128)))
//#define LIGHT2SHADE(l) ((NUMCOLORMAPS*2*FRACUNIT)-(((l)+12)*(FRACUNIT*NUMCOLORMAPS/128)))
// Disable diminishing light (To do: merge with LIGHT2SHADE and let a cvar control it, maybe by converting this to a function, like R_ActualExtraLight)
#define LIGHT2SHADE(lightlev) ((MAX(255 - lightlev, 0) * NUMCOLORMAPS) << (FRACBITS - 8))
// MAXLIGHTSCALE from original DOOM, divided by 2.
#define MAXLIGHTVIS (24.0)