- move visibility calculation to LightVisibility
This commit is contained in:
parent
9787e32d28
commit
f35aeec6c3
11 changed files with 14 additions and 17 deletions
|
|
@ -137,9 +137,7 @@ namespace swrenderer
|
|||
basecolormap = colormap;
|
||||
|
||||
// [RH] set foggy flag
|
||||
bool foggy = (level.fadeto || basecolormap->Fade || (level.flags & LEVEL_HASFADETABLE));
|
||||
|
||||
GlobVis = Thread->Light->FlatPlaneGlobVis(foggy) / planeheight;
|
||||
foggy = (level.fadeto || basecolormap->Fade || (level.flags & LEVEL_HASFADETABLE));
|
||||
|
||||
CameraLight *cameraLight = CameraLight::Instance();
|
||||
if (cameraLight->FixedLightLevel() >= 0)
|
||||
|
|
@ -202,7 +200,7 @@ namespace swrenderer
|
|||
if (plane_shade)
|
||||
{
|
||||
// Determine lighting based on the span's distance from the viewer.
|
||||
drawerargs.SetLight(basecolormap, (float)(GlobVis * fabs(viewport->CenterY - y)), planeshade);
|
||||
drawerargs.SetLight(basecolormap, (float)Thread->Light->FlatPlaneVis(y, planeheight, foggy, viewport), planeshade);
|
||||
}
|
||||
|
||||
if (r_dynlights)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue