Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CamRenderer::addLight() performs AABB-based culling of lights
As each light is submitted to addLight(), a simple intersection test is performed between the view frustum and the light's AABB, with any light which falls outside of the frustum (and therefore cannot possibly illuminate any visible pixels) being discarded rather than added to the internal list of lights. In order to allow this test, RendererLight needed a new interface method to return the illuminated AABB, which was easily satisfied by the existing lightAABB() method on the Light class. The submitted lights are still not used for rendering but the number of visible and total lights is now shown in the render stats display, so it is possible to confirm that the count increases or decreases as lights enter or leave the camera view.
- Loading branch information
Matthew Mott
committed
Sep 8, 2020
1 parent
470a99d
commit d6cfb85
Showing
4 changed files
with
80 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters