From 6d58389d72b548356cb830c55699323e97a6f4a5 Mon Sep 17 00:00:00 2001 From: eihrul Date: Tue, 6 Oct 2009 19:57:39 +0000 Subject: [PATCH] fixed biasing issue in shadowmap frustum culling git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9317 d7cf8633-e32d-0410-b094-e92efae38249 --- r_shadow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r_shadow.c b/r_shadow.c index 38171250..244424ef 100644 --- a/r_shadow.c +++ b/r_shadow.c @@ -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) -- 2.39.2