- disabled 'isVisibleToPlayerClass' check for dynamic lights affecting sprites.

Calling this function in the inner loop of a time critical rendering function apparently wreaks havoc with the CPU instruction cache - even though the function doesn't do anything substantial.
This needs some more in-depth investigation why just having that call can increase sprite rendering time by a factor of 10 and more if there's many lights in view.
This commit is contained in:
Christoph Oelckers 2015-11-03 23:55:16 +01:00
parent 4e1723eeb7
commit 16cb4407a4

View file

@ -75,7 +75,7 @@ void gl_SetDynSpriteLight(AActor *self, fixed_t x, fixed_t y, fixed_t z, subsect
while (node) while (node)
{ {
light=node->lightsource; light=node->lightsource;
if (!light->owned || light->target == NULL || light->target->IsVisibleToPlayer()) //if (!light->owned || light->target == NULL || light->target->IsVisibleToPlayer())
{ {
if (!(light->flags2&MF2_DORMANT) && if (!(light->flags2&MF2_DORMANT) &&
(!(light->flags4&MF4_DONTLIGHTSELF) || light->target != self)) (!(light->flags4&MF4_DONTLIGHTSELF) || light->target != self))