]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
default to using texture rectangle shadowmaps when available
authoreihrul <eihrul@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 1 Oct 2009 06:08:31 +0000 (06:08 +0000)
committereihrul <eihrul@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 1 Oct 2009 06:08:31 +0000 (06:08 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9270 d7cf8633-e32d-0410-b094-e92efae38249

r_shadow.c

index 27eeaa4126340e197b18225338f51f96bed77414..b0c345425f84027cc857c434a39daca8a03f1222 100644 (file)
@@ -388,15 +388,15 @@ void R_Shadow_SetShadowMode(void)
                                break;
                        }
                }
-        r_shadow_shadowmode = r_shadow_shadowmaptexturetype;
+               r_shadow_shadowmode = r_shadow_shadowmaptexturetype;
                if(r_shadow_shadowmode <= 0)
                {
-                       if(!gl_texturerectangle || gl_support_arb_texture_non_power_of_two) 
+                       if((gl_support_amd_texture_texture4 || gl_support_arb_texture_gather) && r_shadow_shadowmappcf && !r_shadow_shadowmapsampler)
                                r_shadow_shadowmode = 1;
-                       else if((gl_support_amd_texture_texture4 || gl_support_arb_texture_gather) && r_shadow_shadowmappcf && !r_shadow_shadowmapsampler)
-                               r_shadow_shadowmode = 1;
-                       else 
+                       else if(gl_texturerectangle) 
                                r_shadow_shadowmode = 2;
+                       else
+                               r_shadow_shadowmode = 1;
                }
        }
 }