]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
rearrange r_shadow_shadowmap_texturetype settings so -1 = autoselect, 0 = 2D, 1 ...
authoreihrul <eihrul@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 8 Oct 2009 14:54:05 +0000 (14:54 +0000)
committereihrul <eihrul@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 8 Oct 2009 14:54:05 +0000 (14:54 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9326 d7cf8633-e32d-0410-b094-e92efae38249

r_shadow.c

index 82c9e9717212d45b930a68a71d3e5865c7530c03..5109e5b0dd9f3a616204dc1d7eb67c9e958cc804 100644 (file)
@@ -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;