From e169a2d26f94e1031418fc7f90314907185ba079 Mon Sep 17 00:00:00 2001 From: havoc Date: Mon, 9 Apr 2018 02:52:08 +0000 Subject: [PATCH] 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 ::stable-branch::merge=18196a9701fcdcd17096f8ec03e5bc615e99ca12 --- gl_rmain.c | 2 +- r_shadow.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gl_rmain.c b/gl_rmain.c index c5606728..4e35c2ed 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 11b87427..44fd8f29 100644 --- a/r_shadow.c +++ b/r_shadow.c @@ -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; -- 2.39.2