From f91511bd842aec0e8c1168468bb8a1a734cfde84 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 29 Apr 2018 17:26:45 +0200 Subject: [PATCH] - removed the leftover code for running walls through GLPASS_LIGHTSONLY. Unless in legacy mode, all dynamic light setup is now being done in the preparation pass, for both LM_DEFERRED and LM_DIRECT. --- src/gl/scene/gl_scene.cpp | 3 --- src/gl/scene/gl_walls_draw.cpp | 13 ------------- 2 files changed, 16 deletions(-) diff --git a/src/gl/scene/gl_scene.cpp b/src/gl/scene/gl_scene.cpp index 59f391f701..9314e7d92f 100644 --- a/src/gl/scene/gl_scene.cpp +++ b/src/gl/scene/gl_scene.cpp @@ -310,11 +310,8 @@ void GLSceneDrawer::RenderScene(int recursion) if (gl.lightmethod == LM_DEFERRED && haslights) { GLRenderer->mLights->Begin(); - gl_drawinfo->drawlists[GLDL_PLAINWALLS].DrawWalls(gl_drawinfo, GLPASS_LIGHTSONLY); gl_drawinfo->drawlists[GLDL_PLAINFLATS].DrawFlats(gl_drawinfo, GLPASS_LIGHTSONLY); - gl_drawinfo->drawlists[GLDL_MASKEDWALLS].DrawWalls(gl_drawinfo, GLPASS_LIGHTSONLY); gl_drawinfo->drawlists[GLDL_MASKEDFLATS].DrawFlats(gl_drawinfo, GLPASS_LIGHTSONLY); - gl_drawinfo->drawlists[GLDL_MASKEDWALLSOFS].DrawWalls(gl_drawinfo, GLPASS_LIGHTSONLY); gl_drawinfo->drawlists[GLDL_TRANSLUCENTBORDER].Draw(gl_drawinfo, GLPASS_LIGHTSONLY); gl_drawinfo->drawlists[GLDL_TRANSLUCENT].Draw(gl_drawinfo, GLPASS_LIGHTSONLY, true); gl_drawinfo->drawlists[GLDL_MODELS].Draw(gl_drawinfo, GLPASS_LIGHTSONLY); diff --git a/src/gl/scene/gl_walls_draw.cpp b/src/gl/scene/gl_walls_draw.cpp index d7cb215dd6..a5660be3db 100644 --- a/src/gl/scene/gl_walls_draw.cpp +++ b/src/gl/scene/gl_walls_draw.cpp @@ -236,11 +236,6 @@ void FDrawInfo::RenderTranslucentWall(GLWall *wall) { if (wall->gltexture) { - if (mDrawer->FixedColormap == CM_DEFAULT && gl_lights && gl.lightmethod == LM_DIRECT) - { - if (wall->SetupLights(lightdata)) - wall->dynlightindex = GLRenderer->mLights->UploadLights(lightdata); - } if (!wall->gltexture->tex->GetTranslucency()) gl_RenderState.AlphaFunc(GL_GEQUAL, gl_mask_threshold); else gl_RenderState.AlphaFunc(GL_GEQUAL, 0.f); if (wall->RenderStyle == STYLE_Add) gl_RenderState.BlendFunc(GL_SRC_ALPHA,GL_ONE); @@ -268,15 +263,7 @@ void FDrawInfo::DrawWall(GLWall *wall, int pass) gl_RenderState.SetNormal(wall->glseg.Normal()); switch (pass) { - case GLPASS_LIGHTSONLY: - if (wall->SetupLights(lightdata)) - wall->dynlightindex = GLRenderer->mLights->UploadLights(lightdata); - break; - case GLPASS_ALL: - if (wall->SetupLights(lightdata)) - wall->dynlightindex = GLRenderer->mLights->UploadLights(lightdata); - // fall through case GLPASS_PLAIN: RenderTexturedWall(wall, GLWall::RWF_TEXTURED); break;