Patent ID: 8248402

Claim:
A method of performing ray tracing, comprising: generating a set of primary rays into a three-dimensional scene; pooling a first threshold count of secondary rays of the primary rays in a first order, wherein secondary rays are generated when the primary rays intersect objects within the three-dimensional scene; determining whether the pooled secondary rays include at least a second threshold count of rays having a similar property, regardless of types of the secondary rays, wherein the property is selected from at least one of a secondary ray trajectory and a secondary ray originating location; upon determining that the second threshold count is not met, traversing the pooled secondary rays through a spatial index according to the first order, wherein the spatial index has nodes representing bounding volumes in the three-dimensional scene; and upon determining that the second threshold count is met, traversing the pooled secondary rays through the spatial index according to a second order different from the first order, wherein the pooled secondary rays are reordered into the second order based on the similar property and by operation of one or more computer processors.