]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fixed biasing issue in shadowmap frustum culling
authoreihrul <eihrul@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 6 Oct 2009 19:57:39 +0000 (19:57 +0000)
committereihrul <eihrul@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 6 Oct 2009 19:57:39 +0000 (19:57 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9317 d7cf8633-e32d-0410-b094-e92efae38249

r_shadow.c

index 3817125059c611b99f99c3ac955a8d976deeb45d..244424ef7ff53842a54566ca7d9e2d5784ff42dd 100644 (file)
@@ -1386,7 +1386,7 @@ int R_Shadow_FrustumCullSides(rtlight_t *rtlight, float size, float border)
        int i, j;
        int sides = 0x3F;
        // cos(45 + bias)
-       float scale = 0.707106781186548*(size - 2*border)/size;
+       float scale = 0.707106781186548*size/(size - 2*border);
        for (i = 0;i < 5;i++)
        {
                if (PlaneDiff(rtlight->shadoworigin, &r_refdef.view.frustum[i]) > -0.03125)