From: havoc Date: Mon, 9 Apr 2018 02:52:08 +0000 (+0000) Subject: Change default value of r_shadows_shadowmapscale from 1 to 0.25, so that X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=commitdiff_plain;h=18196a9701fcdcd17096f8ec03e5bc615e99ca12 Change default value of r_shadows_shadowmapscale from 1 to 0.25, so that 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 --- diff --git a/gl_rmain.c b/gl_rmain.c index 4fa5d8b3..bf55c9f7 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -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"}; diff --git a/r_shadow.c b/r_shadow.c index 0ff9cd23..9a5ab0a9 100644 --- a/r_shadow.c +++ b/r_shadow.c @@ -5595,7 +5595,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;