- fixed: Before rendering a portal the dynamic light index must be reset.

Otherwise the portal may 'inherit' some light of the last rendered item.
This is important for non-scene portals which have no dynamic lighting.
This commit is contained in:
Christoph Oelckers 2018-10-27 19:13:44 +02:00
parent cd8c7a17eb
commit 537faa16dc
1 changed files with 1 additions and 0 deletions

View File

@ -256,6 +256,7 @@ void FDrawInfo::RenderPortal(HWPortal *p, bool usestencil)
gp->SetupStencil(this, gl_RenderState, usestencil);
auto new_di = StartDrawInfo(Viewpoint, &VPUniforms);
new_di->mCurrentPortal = gp;
gl_RenderState.SetLightIndex(-1);
gp->DrawContents(new_di, gl_RenderState);
new_di->EndDrawInfo();
GLRenderer->mViewpoints->Bind(vpIndex);