]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
Change default value of r_shadows_shadowmapscale from 1 to 0.25, so that
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 9 Apr 2018 02:52:08 +0000 (02:52 +0000)
committerRudolf Polzer <divVerent@gmail.com>
Sun, 15 Mar 2020 02:28:33 +0000 (22:28 -0400)
shadows cover a larger part of the level around the eye.

Change the way r_shadows 2 size is calculated so that it uses 1/4th of
the texture atlas size (at default this would be 2048 of 8192) rather
than 2*r_shadow_shadowmapping_maxsize (at default that was 2*512 = 1024
of 8192).

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12375 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=18196a9701fcdcd17096f8ec03e5bc615e99ca12

gl_rmain.c
r_shadow.c

index c5606728264f08f53fd3d3a6913233042927b242..4e35c2edaadbdb961f6345c727a5e214bb3d64cf 100644 (file)
@@ -141,7 +141,7 @@ cvar_t r_shadows_throwdirection = {CVAR_SAVE, "r_shadows_throwdirection", "0 0 -
 cvar_t r_shadows_drawafterrtlighting = {CVAR_SAVE, "r_shadows_drawafterrtlighting", "0", "draw fake shadows AFTER realtime lightning is drawn. May be useful for simulating fast sunlight on large outdoor maps with only one noshadow rtlight. The price is less realistic appearance of dynamic light shadows."};
 cvar_t r_shadows_castfrombmodels = {CVAR_SAVE, "r_shadows_castfrombmodels", "0", "do cast shadows from bmodels"};
 cvar_t r_shadows_focus = {CVAR_SAVE, "r_shadows_focus", "0 0 0", "offset the shadowed area focus"};
-cvar_t r_shadows_shadowmapscale = {CVAR_SAVE, "r_shadows_shadowmapscale", "1", "increases shadowmap quality (multiply global shadowmap precision) for fake shadows. Needs shadowmapping ON."};
+cvar_t r_shadows_shadowmapscale = {CVAR_SAVE, "r_shadows_shadowmapscale", "0.25", "higher values increase shadowmap quality at a cost of area covered (multiply global shadowmap precision) for fake shadows. Needs shadowmapping ON."};
 cvar_t r_shadows_shadowmapbias = {CVAR_SAVE, "r_shadows_shadowmapbias", "-1", "sets shadowmap bias for fake shadows. -1 sets the value of r_shadow_shadowmapping_bias. Needs shadowmapping ON."};
 cvar_t r_q1bsp_skymasking = {0, "r_q1bsp_skymasking", "1", "allows sky polygons in quake1 maps to obscure other geometry"};
 cvar_t r_polygonoffset_submodel_factor = {0, "r_polygonoffset_submodel_factor", "0", "biases depth values of world submodels such as doors, to prevent z-fighting artifacts in Quake maps"};
index 11b87427fb4d97514227c9568531c2c6ae6dacfd..44fd8f2935fa0e498771014f924f39d02ce44b95 100644 (file)
@@ -5600,7 +5600,7 @@ void R_Shadow_PrepareModelShadows(void)
                return;
        }
 
-       size = 2 * r_shadow_shadowmapmaxsize;
+       size = r_shadow_shadowmaptexturesize / 4;
        scale = r_shadow_shadowmapping_precision.value * r_shadows_shadowmapscale.value;
        radius = 0.5f * size / scale;