Commit Graph

2 Commits

Author SHA1 Message Date
Mathias Agopian
1f3dad48b6 Improve Binary Tree Array by getting rid of the recursion
We use a stack instead, it’s not terribly different
from the recursion but it saves function calls
which use a lot more stack than needed.
2018-08-22 14:55:17 -07:00
Mathias Agopian
38de58007c checkpoint: ground work for calculating binary light trees
computeLightTree() takes a list of light as
a bitfield and produces a depth-first 
binary tree array that can be used to efficiently
check which lights volumes contain a given z
coordinate in screen space.

Currently computeLightTree() produces the array
locally on the stack, which isn’t useful, but
before we can make use of it, a lot of other
things have to happen.
2018-08-22 14:55:17 -07:00