mirror of
https://bitbucket.org/CPMADevs/cnq3
synced 2024-11-23 12:32:14 +00:00
removed the stupid r_mapBrightness subtraction system
This commit is contained in:
parent
8599ddd1b3
commit
3c4a71faaf
4 changed files with 8 additions and 11 deletions
|
@ -1,10 +1,12 @@
|
|||
|
||||
DD Mmm 17 - 1.49
|
||||
|
||||
chg: r_brightness <0.25..32> (default: 2) replaces r_overBrightBits
|
||||
r_mapBrightness <0.25..32> (default: 4) replaces r_mapOverBrightBits
|
||||
chg: r_brightness <0.25..32.0> (default: 2) replaces r_overBrightBits
|
||||
r_mapBrightness <0.25..32.0> (default: 2) replaces r_mapOverBrightBits
|
||||
the new cvars use floating-point values (more control) and a linear scale (more intuitive)
|
||||
new_cvar_value = pow(2, old_cvar_value), i.e. 0->1, 1->2, 2->4, 3->8, 4->16
|
||||
to convert the old engine values to the new values:
|
||||
r_brightness = pow(2, r_overBrightBits)
|
||||
r_mapBrightness = pow(2, clamp(r_mapOverBrightBits - r_overBrightBits, 0, 2))
|
||||
|
||||
chg: r_mode selects the video mode
|
||||
r_mode 0 (default) = no screen mode change, desktop resolution
|
||||
|
|
|
@ -33,8 +33,7 @@ static byte* fileBase;
|
|||
|
||||
static void R_ColorShiftLightingBytes( const byte in[4], byte out[4] )
|
||||
{
|
||||
const float brightness = Com_Clamp( 0.25f, 32.0f, r_mapBrightness->value - r_brightness->value );
|
||||
const int scale16 = (int)( brightness * 65536.0f );
|
||||
const int scale16 = (int)( r_mapBrightness->value * 65536.0f );
|
||||
|
||||
// scale based on brightness
|
||||
int r = ( (int)in[0] * scale16 ) >> 16;
|
||||
|
|
|
@ -14,10 +14,6 @@
|
|||
"allows image downscaling before texture upload\n" \
|
||||
"The maximum scale ratio is 2 on both the horizontal and vertical axis."
|
||||
|
||||
#define help_r_mapBrightness \
|
||||
"brightness of lightmap textures\n" \
|
||||
"The lightmaps' brightness will be: r_mapBrightness - r_brightness."
|
||||
|
||||
#define help_r_mode \
|
||||
"video mode to use when r_fullscreen is 1\n" \
|
||||
" 0 = no video mode change, desktop resolution\n" \
|
||||
|
|
|
@ -538,9 +538,9 @@ static const cvarTableItem_t r_cvars[] =
|
|||
{ &r_blitMode, "r_blitMode", "0", CVAR_ARCHIVE, CVART_INTEGER, "0", XSTRING(BLITMODE_MAX), help_r_blitMode },
|
||||
{ &r_brightness, "r_brightness", "2", CVAR_ARCHIVE | CVAR_LATCH, CVART_FLOAT, "0.25", "32", "overall brightness" },
|
||||
// should be called r_lightmapBrightness
|
||||
{ &r_mapBrightness, "r_mapBrightness", "4", CVAR_ARCHIVE | CVAR_LATCH, CVART_FLOAT, "0.25", "32", help_r_mapBrightness },
|
||||
{ &r_mapBrightness, "r_mapBrightness", "2", CVAR_ARCHIVE | CVAR_LATCH, CVART_FLOAT, "0.25", "32", "brightness of lightmap textures" },
|
||||
// should be called r_textureBrightness
|
||||
{ &r_intensity, "r_intensity", "1", CVAR_ARCHIVE | CVAR_LATCH, CVART_FLOAT, "1", NULL, "brightness of non-lightmap textures" },
|
||||
{ &r_intensity, "r_intensity", "1", CVAR_ARCHIVE | CVAR_LATCH, CVART_FLOAT, "1", NULL, "brightness of non-lightmap map textures" },
|
||||
{ &r_fullscreen, "r_fullscreen", "1", CVAR_ARCHIVE | CVAR_LATCH, CVART_BOOL, NULL, NULL, "full-screen mode" },
|
||||
{ &r_width, "r_width", "1280", CVAR_ARCHIVE | CVAR_LATCH, CVART_INTEGER, "320", "65535", "custom window/render width" help_r_mode01 },
|
||||
{ &r_height, "r_height", "720", CVAR_ARCHIVE | CVAR_LATCH, CVART_INTEGER, "240", "65535", "custom window/render height" help_r_mode01 },
|
||||
|
|
Loading…
Reference in a new issue