Merge branch 'master' into game/eliteforce

Conflicts:
	code/client/cl_main.c
This commit is contained in:
Zack Middleton 2015-06-24 16:48:46 -05:00
commit 73de855c27
13 changed files with 1661 additions and 664 deletions

View file

@ -72,6 +72,13 @@ PLATFORM=$(COMPILE_PLATFORM)
endif
export PLATFORM
ifeq ($(PLATFORM),mingw32)
MINGW=1
endif
ifeq ($(PLATFORM),mingw64)
MINGW=1
endif
ifeq ($(COMPILE_ARCH),i86pc)
COMPILE_ARCH=x86
endif
@ -187,7 +194,7 @@ USE_CURL=1
endif
ifndef USE_CURL_DLOPEN
ifeq ($(PLATFORM),mingw32)
ifdef MINGW
USE_CURL_DLOPEN=0
else
USE_CURL_DLOPEN=1
@ -367,18 +374,16 @@ ifneq (,$(findstring "$(PLATFORM)", "linux" "gnu_kfreebsd" "kfreebsd-gnu"))
-pipe -DUSE_ICON
CLIENT_CFLAGS += $(SDL_CFLAGS)
OPTIMIZEVM = -O3 -funroll-loops -fomit-frame-pointer
OPTIMIZEVM = -O3
OPTIMIZE = $(OPTIMIZEVM) -ffast-math
ifeq ($(ARCH),x86_64)
OPTIMIZEVM = -O3 -fomit-frame-pointer -funroll-loops \
-falign-functions=2 -fstrength-reduce
OPTIMIZEVM = -O3
OPTIMIZE = $(OPTIMIZEVM) -ffast-math
HAVE_VM_COMPILED = true
else
ifeq ($(ARCH),x86)
OPTIMIZEVM = -O3 -march=i586 -fomit-frame-pointer \
-funroll-loops -falign-functions=2 -fstrength-reduce
OPTIMIZEVM = -O3 -march=i586
OPTIMIZE = $(OPTIMIZEVM) -ffast-math
HAVE_VM_COMPILED=true
else
@ -479,13 +484,13 @@ ifeq ($(PLATFORM),darwin)
endif
ifeq ($(CROSS_COMPILING),1)
ifeq ($(ARCH),ppc)
CC=powerpc-apple-darwin10-gcc
RANLIB=powerpc-apple-darwin10-ranlib
ifeq ($(ARCH),x86_64)
CC=x86_64-apple-darwin13-cc
RANLIB=x86_64-apple-darwin13-ranlib
else
ifeq ($(ARCH),x86)
CC=i686-apple-darwin10-gcc
RANLIB=i686-apple-darwin10-ranlib
CC=i386-apple-darwin13-cc
RANLIB=i386-apple-darwin13-ranlib
else
$(error Architecture $(ARCH) is not supported when cross compiling)
endif
@ -539,7 +544,7 @@ else # ifeq darwin
# SETUP AND BUILD -- MINGW32
#############################################################################
ifeq ($(PLATFORM),mingw32)
ifdef MINGW
ifeq ($(CROSS_COMPILING),1)
# If CC is already set to something generic, we probably want to use
@ -553,7 +558,7 @@ ifeq ($(PLATFORM),mingw32)
MINGW_PREFIXES=amd64-mingw32msvc x86_64-w64-mingw32
endif
ifeq ($(ARCH),x86)
MINGW_PREFIXES=i586-mingw32msvc i686-w64-mingw32
MINGW_PREFIXES=i586-mingw32msvc i686-w64-mingw32 i686-pc-mingw32
endif
ifndef CC
@ -597,14 +602,12 @@ ifeq ($(PLATFORM),mingw32)
endif
ifeq ($(ARCH),x86_64)
OPTIMIZEVM = -O3 -fno-omit-frame-pointer \
-funroll-loops -falign-functions=2 -fstrength-reduce
OPTIMIZEVM = -O3
OPTIMIZE = $(OPTIMIZEVM) -ffast-math
HAVE_VM_COMPILED = true
endif
ifeq ($(ARCH),x86)
OPTIMIZEVM = -O3 -march=i586 -fno-omit-frame-pointer \
-funroll-loops -falign-functions=2 -fstrength-reduce
OPTIMIZEVM = -O3 -march=i586
OPTIMIZE = $(OPTIMIZEVM) -ffast-math
HAVE_VM_COMPILED = true
endif
@ -687,7 +690,7 @@ ifeq ($(PLATFORM),mingw32)
SDLDLL=SDL2.dll
endif
else # ifeq mingw32
else # ifdef MINGW
#############################################################################
# SETUP AND BUILD -- FREEBSD
@ -702,7 +705,7 @@ ifeq ($(PLATFORM),freebsd)
CLIENT_CFLAGS += $(SDL_CFLAGS)
HAVE_VM_COMPILED = true
OPTIMIZEVM = -O3 -funroll-loops -fomit-frame-pointer
OPTIMIZEVM = -O3
OPTIMIZE = $(OPTIMIZEVM) -ffast-math
SHLIBEXT=so
@ -755,18 +758,16 @@ ifeq ($(PLATFORM),openbsd)
-pipe -DUSE_ICON -DMAP_ANONYMOUS=MAP_ANON
CLIENT_CFLAGS += $(SDL_CFLAGS)
OPTIMIZEVM = -O3 -funroll-loops -fomit-frame-pointer
OPTIMIZEVM = -O3
OPTIMIZE = $(OPTIMIZEVM) -ffast-math
ifeq ($(ARCH),x86_64)
OPTIMIZEVM = -O3 -fomit-frame-pointer -funroll-loops \
-falign-functions=2 -fstrength-reduce
OPTIMIZEVM = -O3
OPTIMIZE = $(OPTIMIZEVM) -ffast-math
HAVE_VM_COMPILED = true
else
ifeq ($(ARCH),x86)
OPTIMIZEVM = -O3 -march=i586 -fomit-frame-pointer \
-funroll-loops -falign-functions=2 -fstrength-reduce
OPTIMIZEVM = -O3 -march=i586
OPTIMIZE = $(OPTIMIZEVM) -ffast-math
HAVE_VM_COMPILED=true
else
@ -940,7 +941,7 @@ else # ifeq sunos
endif #Linux
endif #darwin
endif #mingw32
endif #MINGW
endif #FreeBSD
endif #OpenBSD
endif #NetBSD
@ -1690,7 +1691,7 @@ Q3OBJ = \
$(B)/client/con_log.o \
$(B)/client/sys_main.o
ifeq ($(PLATFORM),mingw32)
ifdef MINGW
Q3OBJ += \
$(B)/client/con_passive.o
else
@ -1711,11 +1712,11 @@ Q3R2OBJ = \
$(B)/renderergl2/tr_font.o \
$(B)/renderergl2/tr_glsl.o \
$(B)/renderergl2/tr_image.o \
$(B)/renderergl2/tr_image_png.o \
$(B)/renderergl2/tr_image_jpg.o \
$(B)/renderergl2/tr_image_bmp.o \
$(B)/renderergl2/tr_image_tga.o \
$(B)/renderergl2/tr_image_jpg.o \
$(B)/renderergl2/tr_image_pcx.o \
$(B)/renderergl2/tr_image_png.o \
$(B)/renderergl2/tr_image_tga.o \
$(B)/renderergl2/tr_init.o \
$(B)/renderergl2/tr_light.o \
$(B)/renderergl2/tr_main.o \
@ -1777,11 +1778,11 @@ Q3ROBJ = \
$(B)/renderergl1/tr_flares.o \
$(B)/renderergl1/tr_font.o \
$(B)/renderergl1/tr_image.o \
$(B)/renderergl1/tr_image_png.o \
$(B)/renderergl1/tr_image_jpg.o \
$(B)/renderergl1/tr_image_bmp.o \
$(B)/renderergl1/tr_image_tga.o \
$(B)/renderergl1/tr_image_jpg.o \
$(B)/renderergl1/tr_image_pcx.o \
$(B)/renderergl1/tr_image_png.o \
$(B)/renderergl1/tr_image_tga.o \
$(B)/renderergl1/tr_init.o \
$(B)/renderergl1/tr_light.o \
$(B)/renderergl1/tr_main.o \
@ -2134,7 +2135,7 @@ ifeq ($(HAVE_VM_COMPILED),true)
endif
endif
ifeq ($(PLATFORM),mingw32)
ifdef MINGW
Q3OBJ += \
$(B)/client/win_resource.o \
$(B)/client/sys_win32.o
@ -2302,7 +2303,7 @@ ifeq ($(HAVE_VM_COMPILED),true)
endif
endif
ifeq ($(PLATFORM),mingw32)
ifdef MINGW
Q3DOBJ += \
$(B)/ded/win_resource.o \
$(B)/ded/sys_win32.o \
@ -2918,7 +2919,7 @@ distclean: clean toolsclean
@rm -rf $(BUILD_DIR)
installer: release
ifeq ($(PLATFORM),mingw32)
ifdef MINGW
@$(MAKE) VERSION=$(VERSION) -C $(NSISDIR) V=$(V) \
SDLDLL=$(SDLDLL) \
USE_RENDERER_DLOPEN=$(USE_RENDERER_DLOPEN) \

View file

@ -2363,9 +2363,9 @@ Resend a connect message if the last one has timed out
=================
*/
void CL_CheckForResend( void ) {
int port, i;
int port;
char info[MAX_INFO_STRING];
char data[MAX_INFO_STRING];
char data[MAX_INFO_STRING + 10];
// don't send anything if playing back a demo
if ( clc.demoplaying ) {
@ -2419,22 +2419,11 @@ void CL_CheckForResend( void ) {
Info_SetValueForKey( info, "qport", va("%i", port ) );
Info_SetValueForKey( info, "challenge", va("%i", clc.challenge ) );
strcpy(data, "connect ");
// TTimo adding " " around the userinfo string to avoid truncated userinfo on the server
// (Com_TokenizeString tokenizes around spaces)
data[8] = '"';
for(i=0;i<strlen(info);i++) {
data[9+i] = info[i]; // + (clc.challenge)&0x3;
}
data[9+i] = '"';
data[10+i] = 0;
// NOTE TTimo don't forget to set the right data length!
Com_sprintf( data, sizeof(data), "connect \"%s\"", info );
#ifdef ELITEFORCE
NET_OutOfBandPrint( NS_CLIENT, clc.serverAddress, "%s", data);
#else
NET_OutOfBandData( NS_CLIENT, clc.serverAddress, (byte *) &data[0], i+10 );
NET_OutOfBandData( NS_CLIENT, clc.serverAddress, (byte *) data, strlen ( data ) );
#endif
// the most current userinfo has been sent, so watch for any
// newer changes to userinfo variables

View file

@ -1256,7 +1256,7 @@ void Info_RemoveKey_Big( char *s, const char *key ) {
if (!strcmp (key, pkey) )
{
strcpy (start, s); // remove this part
memmove(start, s, strlen(s) + 1); // remove this part
return;
}

View file

@ -144,6 +144,20 @@ void R_InitFreeType( void );
void R_DoneFreeType( void );
void RE_RegisterFont(const char *fontName, int pointSize, fontInfo_t *font);
/*
=============================================================
IMAGE LOADERS
=============================================================
*/
void R_LoadBMP( const char *name, byte **pic, int *width, int *height );
void R_LoadJPG( const char *name, byte **pic, int *width, int *height );
void R_LoadPCX( const char *name, byte **pic, int *width, int *height );
void R_LoadPNG( const char *name, byte **pic, int *width, int *height );
void R_LoadTGA( const char *name, byte **pic, int *width, int *height );
/*
====================================================================

View file

@ -1391,20 +1391,6 @@ int R_IQMLerpTag( orientation_t *tag, iqmData_t *data,
int startFrame, int endFrame,
float frac, const char *tagName );
/*
=============================================================
IMAGE LOADERS
=============================================================
*/
void R_LoadBMP( const char *name, byte **pic, int *width, int *height );
void R_LoadJPG( const char *name, byte **pic, int *width, int *height );
void R_LoadPCX( const char *name, byte **pic, int *width, int *height );
void R_LoadPNG( const char *name, byte **pic, int *width, int *height );
void R_LoadTGA( const char *name, byte **pic, int *width, int *height );
/*
=============================================================
=============================================================

View file

@ -2276,20 +2276,6 @@ int R_IQMLerpTag( orientation_t *tag, iqmData_t *data,
int startFrame, int endFrame,
float frac, const char *tagName );
/*
=============================================================
IMAGE LOADERS
=============================================================
*/
void R_LoadBMP( const char *name, byte **pic, int *width, int *height );
void R_LoadJPG( const char *name, byte **pic, int *width, int *height );
void R_LoadPCX( const char *name, byte **pic, int *width, int *height );
void R_LoadPNG( const char *name, byte **pic, int *width, int *height );
void R_LoadTGA( const char *name, byte **pic, int *width, int *height );
/*
=============================================================
=============================================================

View file

@ -130,7 +130,8 @@ static void GLimp_DetectAvailableModes(void)
{
int i, j;
char buf[ MAX_STRING_CHARS ] = { 0 };
SDL_Rect modes[ 128 ];
size_t numSDLModes;
SDL_Rect *modes;
int numModes = 0;
int display = SDL_GetWindowDisplayIndex( SDL_window );
@ -142,7 +143,14 @@ static void GLimp_DetectAvailableModes(void)
return;
}
for( i = 0; i < SDL_GetNumDisplayModes( display ); i++ )
numSDLModes = SDL_GetNumDisplayModes( display );
modes = SDL_calloc( numSDLModes, sizeof( SDL_Rect ) );
if ( !modes )
{
ri.Error( ERR_FATAL, "Out of memory" );
}
for( i = 0; i < numSDLModes; i++ )
{
SDL_DisplayMode mode;
@ -152,6 +160,7 @@ static void GLimp_DetectAvailableModes(void)
if( !mode.w || !mode.h )
{
ri.Printf( PRINT_ALL, "Display supports any resolution\n" );
SDL_free( modes );
return;
}
@ -193,6 +202,7 @@ static void GLimp_DetectAvailableModes(void)
ri.Printf( PRINT_ALL, "Available modes: '%s'\n", buf );
ri.Cvar_Set( "r_availableModes", buf );
}
SDL_free( modes );
}
/*

View file

@ -833,7 +833,7 @@ static void IN_ProcessEvents( void )
Com_QueueEvent( 0, SE_KEY, K_MWHEELUP, qtrue, 0, NULL );
Com_QueueEvent( 0, SE_KEY, K_MWHEELUP, qfalse, 0, NULL );
}
else
else if( e.wheel.y < 0 )
{
Com_QueueEvent( 0, SE_KEY, K_MWHEELDOWN, qtrue, 0, NULL );
Com_QueueEvent( 0, SE_KEY, K_MWHEELDOWN, qfalse, 0, NULL );

View file

@ -813,7 +813,7 @@ void Sys_PlatformInit( void )
signal( SIGHUP, Sys_SigHandler );
signal( SIGQUIT, Sys_SigHandler );
signal( SIGTRAP, Sys_SigHandler );
signal( SIGIOT, Sys_SigHandler );
signal( SIGABRT, Sys_SigHandler );
signal( SIGBUS, Sys_SigHandler );
Sys_SetFloatEnv();

View file

@ -105,7 +105,8 @@ char *basepath( char *fname )
/* memmove is defined here because some vendors don't provide it at
all and others do a terrible job (like calling malloc) */
// -- ouch, that hurts -- ln
#ifndef MACOS_X /* always use the system memmove() on Mac OS X. --ryan. */
/* always use the system memmove() on Mac OS X. --ryan. */
#if !defined(MACOS_X) && !defined(_MSC_VER)
#ifdef memmove
#undef memmove
#endif

File diff suppressed because it is too large Load diff

View file

@ -199,4 +199,5 @@ void yywarn(char *fmt, ...) {
fprintf(stderr, "line %d: ", yylineno);
fprintf(stderr, "warning: ");
vfprintf(stderr, fmt, ap);
va_end(ap);
}

View file

@ -52,7 +52,9 @@ For Win32:
1. Start ioquake3. (ioquake3.x86.exe on Win32)
2. Open the console (default key ~) and type '/cl_renderer opengl2; vid_restart'
2. Open the console (the default key is tilde ~) and type
`/cl_renderer opengl2` and press enter
`/vid_restart` then press enter again.
3. Enjoy.
@ -62,94 +64,94 @@ For Win32:
-------------------------------------------------------------------------------
Cvars for simple rendering features:
r_ext_compressed_textures - Automatically compress textures.
* `r_ext_compressed_textures` - Automatically compress textures.
0 - No texture compression. (default)
1 - DXT/LATC texture compression if
supported.
2 - BPTC texture compression if supported.
r_ext_framebuffer_multisample - Multisample Anti-aliasing.
* `r_ext_framebuffer_multisample` - Multisample Anti-aliasing.
0 - None. (default)
1-16 - Some.
17+ - Too much!
r_ssao - Enable screen-space ambient occlusion.
* `r_ssao` - Enable screen-space ambient occlusion.
Currently eats framerate and has some
visible artifacts.
0 - No. (default)
1 - Yes.
Cvars for HDR and tonemapping:
r_hdr - Do scene rendering in a framebuffer with
* `r_hdr` - Do scene rendering in a framebuffer with
high dynamic range. (Less banding, and
exposure changes look much better)
0 - No.
1 - Yes. (default)
r_cameraExposure - Cheat. Alter brightness, in powers of two.
* `r_cameraExposure` - Cheat. Alter brightness, in powers of two.
-2 - 4x as dark.
0 - Normal. (default)
0.5 - Sqrt(2)x as bright.
2 - 4x as bright.
r_postProcess - Enable post-processing.
* `r_postProcess` - Enable post-processing.
0 - No.
1 - Yes. (default)
r_toneMap - Enable tone mapping. Requires
* `r_toneMap` - Enable tone mapping. Requires
r_hdr and r_postProcess.
0 - No.
1 - Yes. (default)
r_forceToneMap - Cheat. Override built-in and map tonemap
settings and use cvars r_forceToneMapAvg,
r_forceToneMapMin, and r_forceToneMapMax.
* `r_forceToneMap` - Cheat. Override built-in and map tonemap settings and use cvars r_forceToneMapAvg, r_forceToneMapMin, and r_forceToneMapMax.
0 - No. (default)
1 - Yes.
r_forceToneMapAvg - Cheat. Map average scene luminance to this
* `r_forceToneMapAvg` - Cheat. Map average scene luminance to this
value, in powers of two. Requires
r_forceToneMap.
-2.0 - Dark.
-1.0 - Kinda dark. (default).
2.0 - Too bright.
r_forceToneMapMin - Cheat. After mapping average, luminance
* `r_forceToneMapMin` - Cheat. After mapping average, luminance
below this level is mapped to black.
Requires r_forceToneMap.
-5 - Not noticeable.
-3.25 - Normal. (default)
0.0 - Too dark.
r_forceToneMapMin - Cheat. After mapping average, luminance
* `r_forceToneMapMin` - Cheat. After mapping average, luminance
above this level is mapped to white.
Requires r_forceToneMap.
0.0 - Too bright.
1.0 - Normal. (default).
2.0 - Washed out.
r_autoExposure - Do automatic exposure based on scene
* `r_autoExposure` - Do automatic exposure based on scene
brightness. Hardcoded to -2 to 2 on maps
that don't specify otherwise. Requires
r_hdr, r_postprocess, and r_toneMap.
0 - No.
1 - Yes. (default)
r_forceAutoExposure - Cheat. Override built-in and map auto
* `r_forceAutoExposure` - Cheat. Override built-in and map auto
exposure settings and use cvars
r_forceAutoExposureMin and
r_forceAutoExposureMax.
0 - No. (default)
1 - Yes.
r_forceAutoExposureMin - Cheat. Set minimum exposure to this value,
* `r_forceAutoExposureMin` - Cheat. Set minimum exposure to this value,
in powers of two. Requires
r_forceAutoExpsure.
-3.0 - Dimmer.
-2.0 - Normal. (default)
-1.0 - Brighter.
r_forceAutoExposureMax - Cheat. Set maximum exposure to this value,
* `r_forceAutoExposureMax` - Cheat. Set maximum exposure to this value,
in powers of two. Requires
r_forceAutoExpsure.
1.0 - Dimmer.
@ -157,7 +159,8 @@ Cvars for HDR and tonemapping:
3.0 - Brighter.
Cvars for advanced material usage:
r_normalMapping - Enable normal mapping for materials that
* `r_normalMapping` - Enable normal mapping for materials that
support it, and also specify advanced
shading techniques.
0 - No.
@ -167,7 +170,7 @@ Cvars for advanced material usage:
3 - Yes, and use tri-Ace's Oren-Nayar
reflectance model.
r_specularMapping - Enable specular mapping for materials that
* `r_specularMapping` - Enable specular mapping for materials that
support it, and also specify advanced
specular techniques.
0 - No.
@ -176,7 +179,7 @@ Cvars for advanced material usage:
3 - Yes, and use Cook-Torrance.
4 - Yes, and use Torrance-Sparrow.
r_deluxeMapping - Enable deluxe mapping. (Map is compiled
* `r_deluxeMapping` - Enable deluxe mapping. (Map is compiled
with light directions.) Even if the map
doesn't have deluxe mapping compiled in,
an approximation based on the lightgrid
@ -184,27 +187,27 @@ Cvars for advanced material usage:
0 - No.
1 - Yes. (default)
r_parallaxMapping - Enable parallax mapping for materials that
* `r_parallaxMapping` - Enable parallax mapping for materials that
support it.
0 - No. (default)
1 - Use parallax occlusion mapping.
2 - Use relief mapping. (slower)
r_baseSpecular - Set the specular reflectance of materials
* `r_baseSpecular` - Set the specular reflectance of materials
which don't include a specular map or
use the specularReflectance keyword.
0 - No.
0.04 - Realistic. (default)
1.0 - Ack.
r_baseGloss - Set the glossiness of materials which don't
* `r_baseGloss` - Set the glossiness of materials which don't
include a specular map or use the
specularExponent keyword.
0 - Rough.
0.3 - Default.
1.0 - Shiny.
r_baseNormalX - Set the scale of the X values from normal
* `r_baseNormalX` - Set the scale of the X values from normal
maps when the normalScale keyword is not
used.
-1 - Flip X.
@ -212,7 +215,7 @@ Cvars for advanced material usage:
1 - Normal X. (default)
2 - Double X.
r_baseNormalY - Set the scale of the Y values from normal
* `r_baseNormalY` - Set the scale of the Y values from normal
maps when the normalScale keyword is not
used.
-1 - Flip Y.
@ -220,7 +223,7 @@ Cvars for advanced material usage:
1 - Normal Y. (default)
2 - Double Y.
r_baseParallax - Sets the scale of the parallax effect for
* `r_baseParallax` - Sets the scale of the parallax effect for
materials when the parallaxDepth keyword
is not used.
0 - No depth.
@ -229,7 +232,8 @@ Cvars for advanced material usage:
0.1 - Looks broken.
Cvars for image interpolation and generation:
r_imageUpsample - Use interpolation to artifically increase
* `r_imageUpsample` - Use interpolation to artifically increase
the resolution of all textures. Looks good
in certain circumstances.
0 - No. (default)
@ -237,50 +241,48 @@ Cvars for image interpolation and generation:
2 - 4x size.
3 - 8x size, etc
r_imageUpsampleMaxSize - Maximum texture size when upsampling
* `r_imageUpsampleMaxSize` - Maximum texture size when upsampling
textures.
1024 - Default.
2048 - Really nice.
4096 - Really slow.
8192 - Crash.
r_imageUpsampleType - Type of interpolation when upsampling
* `r_imageUpsampleType` - Type of interpolation when upsampling
textures.
0 - None. (probably broken)
1 - Bad but fast (default,
FCBI without second derivatives)
2 - Okay but slow (normal FCBI)
r_genNormalMaps - Naively generate normal maps for all
* `r_genNormalMaps* - Naively generate normal maps for all
textures.
0 - Don't. (default)
1 - Do.
Cvars for the sunlight and cascaded shadow maps:
r_forceSun - Cheat. Force sunlight and shadows, using sun
position from sky material.
* `r_forceSun` - Cheat. Force sunlight and shadows, using sun position from sky material.
0 - Don't. (default)
1 - Do.
2 - Sunrise, sunset.
r_forceSunMapLightScale - Cheat. Scale map brightness by this factor
* `r_forceSunMapLightScale` - Cheat. Scale map brightness by this factor
when r_forceSun 1.
1.0 - Default
r_forceSunLightScale - Cheat. Scale sun brightness by this factor
* `r_forceSunLightScale` - Cheat. Scale sun brightness by this factor
when r_forceSun 1.
1.0 - Default
r_forceSunAmbientScale - Cheat. Scale sun ambient brightness by this
factor when r_forceSun 1.
0.5 - Default
r_sunShadows - Enable sunlight and cascaded shadow maps for
* `r_forceSunAmbientScale` - Cheat. Scale sun ambient brightness by this factor when r_forceSun 1. 0.5 - Default
* `r_sunShadows` - Enable sunlight and cascaded shadow maps for
it on maps that support it.
0 - No.
1 - Yes. (default)
r_sunlightMode - Specify the method used to add sunlight to
* `r_sunlightMode` - Specify the method used to add sunlight to
the scene.
0 - No.
1 - Multiply lit areas by light scale, and
@ -290,13 +292,13 @@ Cvars for the sunlight and cascaded shadow maps:
and doesn't integrate well with existing
maps.
r_shadowFilter - Enable filtering shadows for a smoother
* `r_shadowFilter` - Enable filtering shadows for a smoother
look.
0 - No.
1 - Some. (default)
2 - Much.
r_shadowMapSize - Size of each cascaded shadow map.
* `r_shadowMapSize` - Size of each cascaded shadow map.
256 - 256x256, ugly, probably shouldn't
go below this.
512 - 512x512, passable.
@ -306,77 +308,78 @@ Cvars for the sunlight and cascaded shadow maps:
2048.
Cvars that you probably don't care about or shouldn't mess with:
r_mergeMultidraws - Optimize number of calls to
* `r_mergeMultidraws` - Optimize number of calls to
glMultiDrawElements().
0 - Don't.
1 - Do some. (default)
2 - Do more than necessary (eats CPU).
r_mergeLeafSurfaces - Merge surfaces that share common materials
* `r_mergeLeafSurfaces` - Merge surfaces that share common materials
and a common leaf. Speeds up rendering.
0 - Don't.
1 - Do. (default)
r_recalcMD3Normals - Recalculate the normals when loading an MD3.
* `r_recalcMD3Normals` - Recalculate the normals when loading an MD3.
Fixes normal maps in some cases but looks
ugly in others.
0 - Don't. (default)
1 - Do.
r_depthPrepass - Do a depth-only pass before rendering.
* `r_depthPrepass` - Do a depth-only pass before rendering.
Speeds up rendering in cases where advanced
features are used. Required for
r_sunShadows.
0 - No.
1 - Yes. (default)
r_normalAmbient - Split map light into ambient and directed
* `r_normalAmbient` - Split map light into ambient and directed
portions when doing deluxe mapping. Not
very useful.
0 - Don't. (default).
0.3 - 30% ambient, 70% directed.
1.0 - 100% ambient.
r_mergeLightmaps - Merge the small (128x128) lightmaps into
* `r_mergeLightmaps` - Merge the small (128x128) lightmaps into
2 or fewer giant (4096x4096) lightmaps.
Easy speedup.
0 - Don't.
1 - Do. (default)
r_shadowCascadeZNear - Near plane for shadow cascade frustums.
* `r_shadowCascadeZNear` - Near plane for shadow cascade frustums.
4 - Default.
r_shadowCascadeZFar - Far plane for shadow cascade frustums.
* `r_shadowCascadeZFar` - Far plane for shadow cascade frustums.
3072 - Default.
r_shadowCascadeZBias - Z-bias for shadow cascade frustums.
* `r_shadowCascadeZBias` - Z-bias for shadow cascade frustums.
-256 - Default.
r_materialGamma - Gamma level for material textures.
* `r_materialGamma` - Gamma level for material textures.
(diffuse, specular)
1.0 - Quake 3, fastest. (default)
r_lightGamma - Gamma level for light.
* `r_lightGamma` - Gamma level for light.
(lightmap, lightgrid, vertex lights)
1.0 - Quake 3, fastest. (default)
r_framebufferGamma - Gamma level for framebuffers.
* `r_framebufferGamma` - Gamma level for framebuffers.
1.0 - Quake 3, fastest. (default)
r_tonemapGamma - Gamma applied after tonemapping.
* `r_tonemapGamma` - Gamma applied after tonemapping.
1.0 - Quake 3, fastest. (default)
Cvars that have broken bits:
r_dlightMode - Change how dynamic lights look.
* `r_dlightMode` - Change how dynamic lights look.
0 - Quake 3 style dlights, fake
brightening. (default)
1 - Actual lighting, no shadows.
2 - Light and shadows. (broken)
r_pshadowDist - Virtual camera distance when creating shadow
maps for projected shadows. Deprecated.
cg_shadows - Old shadow code. Deprecated.
* `r_pshadowDist` - Virtual camera distance when creating shadowmaps for projected shadows. Deprecated.
* `cg_shadows` - Old shadow code. Deprecated.
-------------------------------------------------------------------------------