Skip to content

Commit

Permalink
Tighter shadow caster culling
Browse files Browse the repository at this point in the history
Existing shadow caster culling using the octree only is very approximate. This PR adds the highly encapsulated class VisualServerLightCuller explicitly to deal with the problem, it is very easy and requires minimal change to use with the existing system and will also work with vulkan branch.

The tests done are very cheap and are unlikely to have any measurable detrimental effect even in extreme circumstances. In game levels using realtime lights the culling will typically offer a modest improvement to FPS, typically around 10%, although frame rate can more than double in some circumstances (directional lights like a sun particularly with PSSM can offer a large improvement).

There is functionality for spotlights, omni and directional.
  • Loading branch information
lawnjelly committed Nov 4, 2019
1 parent a49c8d4 commit dfcef3b
Show file tree
Hide file tree
Showing 4 changed files with 703 additions and 0 deletions.
Loading

0 comments on commit dfcef3b

Please sign in to comment.