From: tomaz Date: Tue, 21 Sep 2010 19:35:20 +0000 (+0000) Subject: Fixed dynamic light shadowmapping in D3D, still gotta fix them in deferred X-Git-Tag: xonotic-v0.1.0preview~230^2~7 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4352792d696b5831ffd9ab0f3ec2b91b89f24708;p=xonotic%2Fdarkplaces.git 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 --- diff --git a/r_shadow.c b/r_shadow.c index a5005db3..454ec441 100644 --- a/r_shadow.c +++ b/r_shadow.c @@ -2046,7 +2046,6 @@ 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; @@ -2116,6 +2115,8 @@ 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; @@ -2128,13 +2129,13 @@ init_done: { GL_ColorMask(0,0,0,0); if (clear) - GL_Clear(GL_DEPTH_BUFFER_BIT, testcolor, 1.0f, 0); + GL_Clear(GL_DEPTH_BUFFER_BIT, clearcolor, 1.0f, 0); } else { GL_ColorMask(1,1,1,1); if (clear) - GL_Clear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT, testcolor, 1.0f, 0); + GL_Clear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT, clearcolor, 1.0f, 0); } break; case RENDERPATH_D3D10: