Make LightVisibility thread local

This commit is contained in:
Magnus Norddahl 2017-03-12 20:40:00 +01:00
commit 00f6ed45a2
28 changed files with 45 additions and 48 deletions

View file

@ -249,7 +249,7 @@ void RenderPolyWall::Render(const TriMatrix &worldToClip, const Vec4f &clipPlane
}
PolyDrawArgs args;
args.uniforms.globvis = (float)swrenderer::LightVisibility::Instance()->WallGlobVis(foggy);
args.uniforms.globvis = (float)PolyRenderer::Instance()->Thread.Light->WallGlobVis(foggy);
args.uniforms.light = (uint32_t)(GetLightLevel() / 255.0f * 256.0f);
args.uniforms.flags = 0;
args.uniforms.subsectorDepth = SubsectorDepth;