From a81420212fe295610d9266855ba2d7200db1b666 Mon Sep 17 00:00:00 2001 From: havoc Date: Fri, 6 Feb 2004 05:24:44 +0000 Subject: [PATCH] renamed r_shadow_shadows to r_shadow_dlightshadows and added r_shadow_worldshadows cvar git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3874 d7cf8633-e32d-0410-b094-e92efae38249 --- gl_rmain.c | 10 +++++----- r_shadow.c | 9 ++++++--- r_shadow.h | 3 ++- todo | 10 +++++++++- 4 files changed, 22 insertions(+), 10 deletions(-) diff --git a/gl_rmain.c b/gl_rmain.c index 1da7d975..e7a3ac58 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -583,7 +583,7 @@ void R_ShadowVolumeLighting(int visiblevolumes) VectorScale(lightcolor, f, lightcolor); } - if (wl->castshadows && (gl_stencil || visiblevolumes)) + if (r_shadow_worldshadows.integer && wl->castshadows && (gl_stencil || visiblevolumes)) { if (!visiblevolumes) R_Shadow_Stage_ShadowVolumes(); @@ -599,7 +599,7 @@ void R_ShadowVolumeLighting(int visiblevolumes) if (!visiblevolumes) { - if (wl->castshadows && gl_stencil) + if (r_shadow_worldshadows.integer && wl->castshadows && gl_stencil) R_Shadow_Stage_LightWithShadows(); else R_Shadow_Stage_LightWithoutShadows(); @@ -668,7 +668,7 @@ void R_ShadowVolumeLighting(int visiblevolumes) cullradius = RadiusFromBoundsAndOrigin(clipmins, clipmaxs, rd->origin); VectorScale(rd->light, (1.0f / 4096.0f), lightcolor); - if (r_shadow_shadows.integer && (gl_stencil || visiblevolumes)) + if (r_shadow_dlightshadows.integer && (gl_stencil || visiblevolumes)) { if (!visiblevolumes) R_Shadow_Stage_ShadowVolumes(); @@ -687,7 +687,7 @@ void R_ShadowVolumeLighting(int visiblevolumes) if (!visiblevolumes) { - if (r_shadow_shadows.integer && gl_stencil) + if (r_shadow_dlightshadows.integer && gl_stencil) R_Shadow_Stage_LightWithShadows(); else R_Shadow_Stage_LightWithoutShadows(); @@ -796,7 +796,7 @@ static void R_SetupFrame (void) VectorNegate(r_viewleft, r_viewright); GL_SetupView_ViewPort(r_refdef.x, r_refdef.y, r_refdef.width, r_refdef.height); - if ((r_shadow_realtime_world.integer || r_shadow_shadows.integer) && gl_stencil) + if (gl_stencil && ((r_shadow_realtime_world.integer && r_shadow_worldshadows.integer) || ((r_shadow_realtime_world.integer || r_shadow_realtime_dlight.integer) && r_shadow_dlightshadows.integer))) GL_SetupView_Mode_PerspectiveInfiniteFarClip(r_refdef.fov_x, r_refdef.fov_y, 1.0f); else GL_SetupView_Mode_Perspective(r_refdef.fov_x, r_refdef.fov_y, 1.0f, r_farclip); diff --git a/r_shadow.c b/r_shadow.c index fcfcfcb4..11e62aae 100644 --- a/r_shadow.c +++ b/r_shadow.c @@ -166,7 +166,8 @@ cvar_t r_shadow_portallight = {0, "r_shadow_portallight", "1"}; cvar_t r_shadow_projectdistance = {0, "r_shadow_projectdistance", "10000"}; cvar_t r_shadow_texture3d = {0, "r_shadow_texture3d", "1"}; cvar_t r_shadow_singlepassvolumegeneration = {0, "r_shadow_singlepassvolumegeneration", "1"}; -cvar_t r_shadow_shadows = {CVAR_SAVE, "r_shadow_shadows", "1"}; +cvar_t r_shadow_worldshadows = {0, "r_shadow_worldshadows", "1"}; +cvar_t r_shadow_dlightshadows = {CVAR_SAVE, "r_shadow_dlightshadows", "1"}; cvar_t r_shadow_showtris = {0, "r_shadow_showtris", "0"}; int c_rt_lights, c_rt_clears, c_rt_scissored; @@ -256,7 +257,8 @@ void R_Shadow_Help_f(void) "r_shadow_projectdistance : shadow volume projection distance\n" "r_shadow_texture3d : use 3d attenuation texture (if hardware supports)\n" "r_shadow_singlepassvolumegeneration : selects shadow volume algorithm\n" -"r_shadow_shadows : dlight shadows (world always has shadows)\n" +"r_shadow_worldshadows : enable world shadows\n" +"r_shadow_dlightshadows : enable dlight shadows\n" "Commands:\n" "r_shadow_help : this help\n" ); @@ -283,7 +285,8 @@ void R_Shadow_Init(void) Cvar_RegisterVariable(&r_shadow_projectdistance); Cvar_RegisterVariable(&r_shadow_texture3d); Cvar_RegisterVariable(&r_shadow_singlepassvolumegeneration); - Cvar_RegisterVariable(&r_shadow_shadows); + Cvar_RegisterVariable(&r_shadow_worldshadows); + Cvar_RegisterVariable(&r_shadow_dlightshadows); Cvar_RegisterVariable(&r_shadow_showtris); Cmd_AddCommand("r_shadow_help", R_Shadow_Help_f); R_Shadow_EditLights_Init(); diff --git a/r_shadow.h b/r_shadow.h index 2e1a9d4c..78ff414a 100644 --- a/r_shadow.h +++ b/r_shadow.h @@ -11,7 +11,8 @@ extern cvar_t r_shadow_gloss; extern cvar_t r_shadow_debuglight; extern cvar_t r_shadow_bumpscale_bumpmap; extern cvar_t r_shadow_bumpscale_basetexture; -extern cvar_t r_shadow_shadows; +extern cvar_t r_shadow_worldshadows; +extern cvar_t r_shadow_dlightshadows; void R_Shadow_Init(void); void R_Shadow_Volume(int numverts, int numtris, const float *invertex3f, int *elements, int *neighbors, vec3_t relativelightorigin, float lightradius, float projectdistance); diff --git a/todo b/todo index a19d4b61..2df964d1 100644 --- a/todo +++ b/todo @@ -35,6 +35,14 @@ -n darkplaces: server is starting before the "port" cvar is set by commandline and scripts? (yummyluv) -n darkplaces: typing ip in join game menu should show 'trying' and 'no response' after a while, or 'no network' if networking is not initialized (yummyluv) -n dpmod: make grapple off-hand (joe hill) +d darkplaces: replace key system with twilight key system, note that this breaks existing mouse4 and mouse5 binds, and adds in_bindmap capability +2 darkplaces: make the world lights check pvs bits instead of recursing a box which would tend to touch solids +3 darkplaces: figure out why dlights are apparently disappearing in nexuiz when far away (Vermeulen) +0 darkplaces: add r_editlights_editall command, same as _edit but affects all lights (mashakos) +d darkplaces: rename r_shadow_shadows to r_shadow_dlightshadows and add r_shadow_worldshadows (mashakos) +0 darkplaces: make sure that the fragment allocator can upload a full size block that uses the entire image, this may involve width/height comparisons needing a + 1 (fuh) +0 darkplaces: figure out why zombies are disappearing when not entirely submerged in some hipnotic maps (romi) +0 darkplaces: add cl_censor cvar which would replace 'swearing' with humorous messages (Deej) 3 darkplaces: add a sound unloader of some sort, to allow music and other one-level stuff to be unloaded 0 dpmod: fix angled corpse bug 0 darkplaces: add lava-steam particle puff effect for bursting lava bubbles (Zombie) @@ -315,7 +323,7 @@ d darkplaces: q1bsp trace bug: scrags frequently fly through ceilings - this nee 3 darkplaces: finish DP_QC_BOTCLIENT extension docs and implement it (MauveBib, Supajoe) 3 darkplaces: hub save support, one file indicating active map, and then for each map it saves a quake savegame (SeienAbunae) 3 darkplaces: make a new caching system with handles (which can be purged) and give every entity a cache handle to a model instance, which contains cache handles for each mesh/array -3 darkplaces: mod browser (and ability to switch mods) (SeienAbunae) +3 darkplaces: mod browser (and ability to switch mods) (SeienAbunae, mashakos) 3 darkplaces: rearrange menus - make Graphics Options submenu and move video and renderer stuff there, add Apply button to video section (tell Elric) 3 darkplaces: scriptable particle effects (Supajoe, FrikaC, [TACO], SeienAbunae) 3 darkplaces: skyroom needs to be added ("info_skyroom" entity sets view origin, scanned by client at load, and by server to send all entities in skyroom) (SeienAbunae) -- 2.39.2