DarkRadiant: master d6cfb858

Author Committer Branch Timestamp Parent
orbweaver orbweaver master 08.09.2020 19:34 master 470a99d9
Changeset 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.
mod - include/irender.h Diff File
mod - radiant/camera/CamWnd.cpp Diff File
mod - radiant/entity/light/LightNode.h Diff File
mod - radiant/render/RenderStatistics.h Diff File