Skip to content

Commit

Permalink
- fixed bad range check in shadowmap code.
Browse files Browse the repository at this point in the history
Since the last refactoring this only counts lights, not occupied entries in the array, but the check wasn't adjusted for that.
  • Loading branch information
coelckers committed Jun 12, 2020
1 parent 8e46f23 commit 80b5a66
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/p_setup.cpp
Expand Up @@ -366,6 +366,7 @@ void FLevelLocals::ClearLevelData()
localEventManager->Shutdown();
if (aabbTree) delete aabbTree;
aabbTree = nullptr;
screen->SetAABBTree(nullptr);

}

Expand Down
2 changes: 1 addition & 1 deletion src/rendering/hwrenderer/hw_entrypoint.cpp
Expand Up @@ -73,7 +73,7 @@ void CollectLights(FLevelLocals* Level)
for (auto light = Level->lights; light; light = light->next)
{
IShadowMap::LightsProcessed++;
if (light->shadowmapped && light->IsActive() && lightindex < 1024 * 4)
if (light->shadowmapped && light->IsActive() && lightindex < 1024)
{
IShadowMap::LightsShadowmapped++;

Expand Down

0 comments on commit 80b5a66

Please sign in to comment.