From: tomaz tomaz@d7cf8633-e32d-0410-b094-e92efae38249 <> Date: Tue, 21 Sep 2010 19:35:20 +0000 (+0000) Subject: UNMERGE X-Git-Tag: xonotic-v0.1.0preview~222 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0ea95c5000c20ecdd465680d1cf87ff7d7c4c974;p=xonotic%2Fdarkplaces.git UNMERGE 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 --- diff --git a/r_shadow.c b/r_shadow.c index 454ec441..a5005db3 100644 --- a/r_shadow.c +++ b/r_shadow.c @@ -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: