Method and System for a Separated Shadowing in Ray Tracing
The present disclosure describes a new ray tracing shadowing method. The method is unique as it separates the shadowing from the tracing stages of primary and secondary rays. It provides high data locality, reduced amount of intersection tests, no traversals and no reconstruction of complex acceleration structures, as well as improved load balancing based on actual processing load.
1 . A method to generate shadowing in a scene space as a separate stage of ray tracing in a computer graphics system, comprising the steps of:
[1a] per each light source
[1] subdividing the scene space to non-uniform cells;
[1b] generating shadow stencils in cells;
[1c] assigning processing resources to a cell;
[1d] shadowing all hit points in a cell;
[1e] repeating steps and for all cells, until shadowing of the scene space is completed;
[2] repeating step [2] for all light sources;
[3] wherein, step 1 starts upon completion of primary and secondary stages of ray tracing.
2 . The method of claim 1 , wherein said subdivision of the scene space into cells is done concentrically with a light source.
3 . The method of claim 1 , wherein said subdivision of scene space into non-uniform cells is done according to the load of hit points.
4 . The method of claim 3 , wherein said hit points are evenly distributed among said cells.
5 . The method of claim 3 , wherein said hit points are results of primary and secondary stages of ray tracing.
6 . The method of claim 4 , wherein an even distribution of hit points among cells assists in a static load balancing of a working load.
7 . The method of claim 1 , wherein cell's shadow stencil holds identification of a light blocking objects.
8 . A ray tracing system having shadowing made as a separate stage, comprising:
[1] one or more processors with memory,
[2] scene data subdivided into non-uniform cells,
[3] shadow stencils in cells;
[4] processing resources assigned to cells;
Wherein, said separate step of shadowing takes place after primary and secondary stages are completed, and their generated workload of hit points is known.
9 . The system of claim 8 , wherein said cells are concentric with a light source.
10 . The system of claim 8 , wherein said scene space is sub-divided into non-uniform cells according to the load of hit points.
11 . The system of claim 8 , wherein said hit points are evenly distributed among said cells.
12 . The system of claim 8 , wherein said workload of hit points is evenly distributed among cells for a static load balance.
13 . The system of claim 8 , wherein shadow stencils in cells hold identification of a light blocking objects.
14 . The method of claim 8 , wherein said shadow stencil is a discrete raster of fragments, each fragment holding an information on light blocking, and identification and depth of blocking object.