- 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.
This commit is contained in:
Christoph Oelckers 2018-04-29 17:26:45 +02:00
parent e9d84b8820
commit f91511bd84
2 changed files with 0 additions and 16 deletions

View file

@ -310,11 +310,8 @@ void GLSceneDrawer::RenderScene(int recursion)
if (gl.lightmethod == LM_DEFERRED && haslights) if (gl.lightmethod == LM_DEFERRED && haslights)
{ {
GLRenderer->mLights->Begin(); 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_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_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_TRANSLUCENTBORDER].Draw(gl_drawinfo, GLPASS_LIGHTSONLY);
gl_drawinfo->drawlists[GLDL_TRANSLUCENT].Draw(gl_drawinfo, GLPASS_LIGHTSONLY, true); gl_drawinfo->drawlists[GLDL_TRANSLUCENT].Draw(gl_drawinfo, GLPASS_LIGHTSONLY, true);
gl_drawinfo->drawlists[GLDL_MODELS].Draw(gl_drawinfo, GLPASS_LIGHTSONLY); gl_drawinfo->drawlists[GLDL_MODELS].Draw(gl_drawinfo, GLPASS_LIGHTSONLY);

View file

@ -236,11 +236,6 @@ void FDrawInfo::RenderTranslucentWall(GLWall *wall)
{ {
if (wall->gltexture) 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); if (!wall->gltexture->tex->GetTranslucency()) gl_RenderState.AlphaFunc(GL_GEQUAL, gl_mask_threshold);
else gl_RenderState.AlphaFunc(GL_GEQUAL, 0.f); else gl_RenderState.AlphaFunc(GL_GEQUAL, 0.f);
if (wall->RenderStyle == STYLE_Add) gl_RenderState.BlendFunc(GL_SRC_ALPHA,GL_ONE); 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()); gl_RenderState.SetNormal(wall->glseg.Normal());
switch (pass) switch (pass)
{ {
case GLPASS_LIGHTSONLY:
if (wall->SetupLights(lightdata))
wall->dynlightindex = GLRenderer->mLights->UploadLights(lightdata);
break;
case GLPASS_ALL: case GLPASS_ALL:
if (wall->SetupLights(lightdata))
wall->dynlightindex = GLRenderer->mLights->UploadLights(lightdata);
// fall through
case GLPASS_PLAIN: case GLPASS_PLAIN:
RenderTexturedWall(wall, GLWall::RWF_TEXTURED); RenderTexturedWall(wall, GLWall::RWF_TEXTURED);
break; break;