diff --git a/src/swrenderer/scene/r_light.cpp b/src/swrenderer/scene/r_light.cpp index 5be847bf8d..fa9ae27f93 100644 --- a/src/swrenderer/scene/r_light.cpp +++ b/src/swrenderer/scene/r_light.cpp @@ -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 diff --git a/src/swrenderer/scene/r_light.h b/src/swrenderer/scene/r_light.h index fd919fba15..7b127acb2e 100644 --- a/src/swrenderer/scene/r_light.h +++ b/src/swrenderer/scene/r_light.h @@ -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)