]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix r_shadow_shadowmapping_maxsize validation to not reset each frame if it exceeds...
authoreihrul <eihrul@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 17 Oct 2009 14:55:29 +0000 (14:55 +0000)
committereihrul <eihrul@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 17 Oct 2009 14:55:29 +0000 (14:55 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9345 d7cf8633-e32d-0410-b094-e92efae38249

r_shadow.c

index a167d36008986a9ebe7555fa8e35b98d0c79f7ed..653caced48935d4567f636de25f311e2c47135a5 100644 (file)
@@ -4335,7 +4335,7 @@ void R_ShadowVolumeLighting(qboolean visible)
        dlight_t *light;
        size_t range;
 
-       if (r_shadow_shadowmapmaxsize != r_shadow_shadowmapping_maxsize.integer || 
+       if (r_shadow_shadowmapmaxsize != bound(1, r_shadow_shadowmapping_maxsize.integer, gl_max_size.integer / 4) ||
                (r_shadow_shadowmode != R_SHADOW_SHADOWMODE_STENCIL) != (r_shadow_shadowmapping.integer && r_glsl.integer && gl_support_fragment_shader && gl_support_ext_framebuffer_object) || 
                r_shadow_shadowmapvsdct != (r_shadow_shadowmapping_vsdct.integer != 0) || 
                r_shadow_shadowmaptexturetype != r_shadow_shadowmapping_texturetype.integer ||