mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2024-11-29 15:12:11 +00:00
Disable diminishing light in software renderer
This commit is contained in:
parent
2c27b74e34
commit
eb7955694b
2 changed files with 9 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue