mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-12-16 07:21:28 +00:00
1c3d4b46c6
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.
26 lines
634 B
C
26 lines
634 B
C
#pragma once
|
|
|
|
#include "c_cvars.h"
|
|
#include "v_palette.h"
|
|
#include "templates.h"
|
|
#include "r_utility.h"
|
|
|
|
struct Colormap;
|
|
|
|
int hw_CalcLightLevel(int lightlevel, int rellight, bool weapon, int blendfactor);
|
|
PalEntry hw_CalcLightColor(int light, PalEntry pe, int blendfactor);
|
|
float hw_GetFogDensity(int lightlevel, PalEntry fogcolor, int sectorfogdensity, int blendfactor);
|
|
bool hw_CheckFog(sector_t *frontsector, sector_t *backsector);
|
|
|
|
inline int hw_ClampLight(int lightlevel)
|
|
{
|
|
return clamp(lightlevel, 0, 255);
|
|
}
|
|
|
|
EXTERN_CVAR(Int, gl_weaponlight);
|
|
|
|
inline int getExtraLight()
|
|
{
|
|
return r_viewpoint.extralight * gl_weaponlight;
|
|
}
|
|
|