See end for a question ...
Shot 1 With Fix: This screenshot has the "light bleed through fix":
Shot 1 No Fix: Same shot, without the bleed through fix. The floor above the dynamic light is improperly lit by it.
Shot 2 With Fix: However, you can see wall surfaces that none the less shouldn't be affected.
Shot 2 No Fix: Same shot, without the bleed through fix.
Code in question from Qrack is marked "// JT030305 - fix light bleed through" and "//Discoloda", the code goes in R_Marklights in gl_rlights.c
Code: Select all
for (i=0 ; i<node->numsurfaces ; i++, surf++)
{
int sidebit;
if (surf->flags & SURF_DRAWTILED) // no lights on these
continue;
#if 1 // Light bleed through fix. Baker: Interesting, but incomplete ... see demo thrgib1 at 64:38 gl_flashblend 0
// The light doesn't bleed through. But affects surfaces it shouldn't, none the less.
dist = DotProduct (light->transformed, surf->plane->normal) - surf->plane->dist; // JT030305 - fix light bleed through
if (dist >= 0)
sidebit = 0;
else
sidebit = SURF_PLANEBACK;
if ( (surf->flags & SURF_PLANEBACK) != sidebit ) //Discoloda
continue;
#endif
/ It sucks finding out about these fixes. You just want more and better.