1. A non-transitory computer-readable medium having computer-executable instructions for causing a computer system to perform a method comprising: assigning a Morton code for each of a plurality of primitives, wherein said plurality of primitives correspond to leaf nodes of a binary radix tree; sorting said plurality of Morton codes; building said binary radix tree requiring at most a linear amount of temporary storage with respect to said total number of leaf nodes; building an internal node of said binary radix tree in parallel with one or more of its ancestor nodes; and for each internal node of said binary radix tree, partitioning said plurality of Morton codes into categories based on a corresponding highest differing bit to build a k-d tree over said plurality of primitives.