]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
UNMERGE
authortomaz tomaz@d7cf8633-e32d-0410-b094-e92efae38249 <>
Tue, 21 Sep 2010 19:35:20 +0000 (19:35 +0000)
committerRudolf Polzer <divverent@alientrap.org>
Fri, 24 Sep 2010 19:59:59 +0000 (21:59 +0200)
Fixed dynamic light shadowmapping in D3D, still gotta fix them in deferred

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10477 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::unmerge=4352792d696b5831ffd9ab0f3ec2b91b89f24708

r_shadow.c

index 454ec4417007366c4206778bfb0205ba19d7362e..a5005db3c28ce1a8e5d67ffe54892d70951cde96 100644 (file)
@@ -2046,6 +2046,7 @@ static void R_Shadow_MakeShadowMap(int side, int size)
        }
 }
 
+static float testcolor[4] = {0,1,0,1};
 void R_Shadow_RenderMode_ShadowMap(int side, int clear, int size)
 {
        float nearclip, farclip, bias;
@@ -2115,8 +2116,6 @@ init_done:
                GL_Scissor(viewport.x, viewport.y, viewport.width, viewport.height);
                break;
        case RENDERPATH_D3D9:
-               float clearcolor[4];
-               Vector4Set(clearcolor, 1,1,1,1);
                // completely different meaning than in OpenGL path
                r_shadow_shadowmap_parameters[1] = 0;
                r_shadow_shadowmap_parameters[3] = -bias;
@@ -2129,13 +2128,13 @@ init_done:
                {
                        GL_ColorMask(0,0,0,0);
                        if (clear)
-                               GL_Clear(GL_DEPTH_BUFFER_BIT, clearcolor, 1.0f, 0);
+                               GL_Clear(GL_DEPTH_BUFFER_BIT, testcolor, 1.0f, 0);
                }
                else
                {
                        GL_ColorMask(1,1,1,1);
                        if (clear)
-                               GL_Clear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT, clearcolor, 1.0f, 0);
+                               GL_Clear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT, testcolor, 1.0f, 0);
                }
                break;
        case RENDERPATH_D3D10: