- use a dedicated flag word for the dynamic light flags instead of piggybacking on some flags4 bits.

This commit is contained in:
Christoph Oelckers 2017-06-18 10:15:31 +02:00
commit 3b024c347b
11 changed files with 72 additions and 53 deletions

View file

@ -249,7 +249,7 @@ namespace swrenderer
float lz = (float)lightZ - drawerargs.dc_viewpos.Z;
// Precalculate the constant part of the dot here so the drawer doesn't have to.
bool is_point_light = (cur_node->lightsource->flags4 & MF4_ATTENUATE) != 0;
bool is_point_light = (cur_node->lightsource->lightflags & LF_ATTENUATE) != 0;
float lconstant = ly * ly + lz * lz;
float nlconstant = is_point_light ? lz * drawerargs.dc_normal.Z : 0.0f;