From ca9395c55b8fc5f539051b3a4fc7c70558fc1073 Mon Sep 17 00:00:00 2001 From: eihrul Date: Thu, 8 Oct 2009 14:54:05 +0000 Subject: [PATCH] rearrange r_shadow_shadowmap_texturetype settings so -1 = autoselect, 0 = 2D, 1 = rect, 2 = cubemap git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9326 d7cf8633-e32d-0410-b094-e92efae38249 --- r_shadow.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/r_shadow.c b/r_shadow.c index 82c9e971..5109e5b0 100644 --- a/r_shadow.c +++ b/r_shadow.c @@ -287,7 +287,7 @@ cvar_t r_shadow_realtime_world_compilesvbsp = {0, "r_shadow_realtime_world_compi cvar_t r_shadow_realtime_world_compileportalculling = {0, "r_shadow_realtime_world_compileportalculling", "1", "enables portal-based culling optimization during compilation"}; cvar_t r_shadow_scissor = {0, "r_shadow_scissor", "1", "use scissor optimization of light rendering (restricts rendering to the portion of the screen affected by the light)"}; cvar_t r_shadow_shadowmapping = {CVAR_SAVE, "r_shadow_shadowmapping", "0", "enables use of shadowmapping (depth texture sampling) instead of stencil shadow volumes, requires gl_fbo 1"}; -cvar_t r_shadow_shadowmapping_texturetype = {CVAR_SAVE, "r_shadow_shadowmapping_texturetype", "0", "shadowmap texture types: 0 = auto-select, 1 = 2D, 2 = rectangle, 3 = cubemap"}; +cvar_t r_shadow_shadowmapping_texturetype = {CVAR_SAVE, "r_shadow_shadowmapping_texturetype", "-1", "shadowmap texture types: -1 = auto-select, 0 = 2D, 1 = rectangle, 2 = cubemap"}; cvar_t r_shadow_shadowmapping_filterquality = {CVAR_SAVE, "r_shadow_shadowmapping_filterquality", "-1", "shadowmap filter modes: -1 = auto-select, 0 = no filtering, 1 = bilinear, 2 = bilinear 2x2 blur (fast), 3 = 3x3 blur (moderate), 4 = 4x4 blur (slow)"}; cvar_t r_shadow_shadowmapping_precision = {CVAR_SAVE, "r_shadow_shadowmapping_precision", "24", "requested minimum shadowmap texture precision"}; cvar_t r_shadow_shadowmapping_vsdct = {CVAR_SAVE, "r_shadow_shadowmapping_vsdct", "1", "enables use of virtual shadow depth cube texture"}; @@ -412,16 +412,15 @@ void R_Shadow_SetShadowMode(void) break; } } - r_shadow_shadowmode = r_shadow_shadowmaptexturetype; switch (r_shadow_shadowmaptexturetype) { - case 1: + case 0: r_shadow_shadowmode = R_SHADOW_SHADOWMODE_SHADOWMAP2D; break; - case 2: + case 1: r_shadow_shadowmode = R_SHADOW_SHADOWMODE_SHADOWMAPRECTANGLE; break; - case 3: + case 2: r_shadow_shadowmode = R_SHADOW_SHADOWMODE_SHADOWMAPCUBESIDE; break; default: @@ -492,8 +491,8 @@ void r_shadow_start(void) r_shadow_shadowmapmaxsize = 0; r_shadow_shadowmapsize = 0; r_shadow_shadowmaplod = 0; - r_shadow_shadowmapfilterquality = 0; - r_shadow_shadowmaptexturetype = 0; + r_shadow_shadowmapfilterquality = -1; + r_shadow_shadowmaptexturetype = -1; r_shadow_shadowmapprecision = 0; r_shadow_shadowmapvsdct = false; r_shadow_shadowmapsampler = false; -- 2.39.2