- move visibility calculation to LightVisibility

This commit is contained in:
Magnus Norddahl 2018-12-17 05:10:26 +01:00
commit f35aeec6c3
11 changed files with 14 additions and 17 deletions

View file

@ -188,7 +188,7 @@ namespace swrenderer
bool fullbright = !vis->foggy && ((renderflags & RF_FULLBRIGHT) || (thing->flags5 & MF5_BRIGHT));
bool fadeToBlack = (vis->RenderStyle.Flags & STYLEF_FadeToBlack) != 0;
vis->Light.SetColormap(thread->Light->SpriteGlobVis(foggy) / MAX(tz, MINZ), spriteshade, basecolormap, fullbright, invertcolormap, fadeToBlack);
vis->Light.SetColormap(thread->Light->SpriteVis(tz, foggy), spriteshade, basecolormap, fullbright, invertcolormap, fadeToBlack);
// Fake a voxel drawing to find its extents..
SpriteDrawerArgs drawerargs;