]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
renamed r_shadow_shadows to r_shadow_dlightshadows and added r_shadow_worldshadows...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 6 Feb 2004 05:24:44 +0000 (05:24 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Fri, 6 Feb 2004 05:24:44 +0000 (05:24 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3874 d7cf8633-e32d-0410-b094-e92efae38249

gl_rmain.c
r_shadow.c
r_shadow.h
todo

index 1da7d9753f0d41cbf3d4f2b6847c454cda1562f4..e7a3ac584cfcc4ae64547b036bc109e366b1344d 100644 (file)
@@ -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);
index fcfcfcb4ac801e431268839431d003c0f4960980..11e62aae756f97efb7489603adb7f137f931483d 100644 (file)
@@ -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();
index 2e1a9d4cac078f34febd0bbb2a78de217ef2419a..78ff414ac1c872ac5358f8fa2b10a7c3102fb51c 100644 (file)
@@ -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 a19d4b61ad5ef53eee67f23414e75f8f7d5d7038..2df964d17d96b752d78f6b2cd2ca6e5632375de6 100644 (file)
--- a/todo
+++ b/todo
 -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)