Reduced Acceleration Structures for Ray Tracing Systems
Ray tracing units, processing modules and methods are described for generating one or more reduced acceleration structures to be used for intersection testing in a ray tracing system for processing a 3D scene. Nodes of the reduced acceleration structure(s) are determined, wherein a reduced acceleration structure represents a subset of the 3D scene. The reduced acceleration structure(s) are stored for use in intersection testing. Since the reduced acceleration structures represent a subset of the scene (rather than the whole scene) the memory usage for storing the acceleration structure is reduced, and the latency in the traversal of the acceleration structure is reduced.
1 . A computer-implemented method of generating one or more separate reduced acceleration structures to be used for intersection testing in a ray tracing system for processing a 3D scene, the method comprising:
determining, by a processor, nodes of the one or more separate reduced acceleration structures, wherein each of the one or more separate reduced acceleration structures represents a respective sub-region within the 3D scene rather than representing the whole 3D scene, wherein the respective sub-regions are determined without dependence on rays to be tested against them; and
storing in a computer readable memory the one or more separate reduced acceleration structures for use in intersection testing.
2 . The method of claim 1 , wherein the respective sub-regions are determined without dependence on the origin and direction of the rays to be tested against them.
3 . The method of claim 1 , wherein a sub-region corresponds to a view frustum within the scene.
4 . The method of claim 1 , wherein the nodes of at least one of the reduced acceleration structures are defined in a view space or a clip space, and wherein nodes of at least one of the reduced acceleration structures have shapes which are elongated in a direction approximately aligned with a viewing direction.
5 . The method of claim 1 , wherein in response to finding an intersection in a first reduced acceleration structure, a shader program is executed which causes a ray to be emitted into a second reduced acceleration structure, wherein the first reduced acceleration structure is different to the second reduced acceleration structure.
6 . The method of claim 1 , wherein the one or more reduced acceleration structures are generated dynamically for each render of the 3D scene.
7 . The method of claim 1 , wherein said determining nodes of the one or more separate reduced acceleration structures comprises culling nodes from a larger acceleration structure.
8 . The method of claim 1 , further comprising generating a world space acceleration structure representing the whole 3D scene, wherein the resolution of primitives represented by nodes of the world space acceleration structure is lower than the resolution of primitives represented by nodes of the one or more reduced acceleration structures.
9 . The method of claim 8 , wherein the nodes of the one or more reduced acceleration structures are determined by reducing the world space acceleration structure to focus on the respective one or more sub-regions within the 3D scene corresponding to the one or more reduced acceleration structures.
10 . The method of claim 1 , further comprising:
performing intersection testing by traversing the one or more reduced acceleration structures; and
using results of said intersection testing for rendering an image of the 3D scene.
11 . The method of claim 10 , further comprising, if the traversal of a reduced acceleration structure results in a miss for a ray, emitting the ray into a world space acceleration structure which represents the whole 3D scene.
12 . A processing module configured to generate one or more separate reduced acceleration structures to be used for intersection testing in a ray tracing system for processing a 3D scene, the processing module comprising:
acceleration structure building logic configured to determine nodes of the one or more separate reduced acceleration structures, wherein each of the one or more separate reduced acceleration structures represents a respective sub-region within the 3D scene rather than representing the whole 3D scene, wherein the respective sub-regions are determined without dependence on rays to be tested against them;
wherein the processing module is configured to cause the one or more separate reduced acceleration structures to be stored for use in intersection testing.
13 . The processing module of claim 12 , configured to generate a plurality of reduced acceleration structures for rendering the 3D scene, wherein the acceleration structure building logic is configured to determine nodes of the plurality of reduced acceleration structures, each of the reduced acceleration structures representing a respective sub-region within the 3D scene, and wherein the processing module is configured to cause the plurality of reduced acceleration structures to be stored for use in intersection testing, wherein different reduced acceleration structures are used during rendering for respective different purposes.
14 . The processing module of claim 13 , wherein the ray tracing system is implemented in a tile-based rendering system, and wherein the processing module is configured to generate a respective reduced acceleration structure for each of a plurality of tiles of a rendering space in which the 3D scene is to be rendered.
15 . The processing module of claim 14 , wherein the sub-region of the 3D scene represented by a particular reduced acceleration structure, which is generated for a particular tile of the rendering space, maps onto the respective particular tile of the rendering space.
16 . A ray tracing unit for processing a 3D scene comprising:
the processing module of claim 12 ; and
intersection testing logic configured to perform intersection testing by traversing the one or more reduced acceleration structures.
17 . The ray tracing unit of claim 16 , wherein the intersection testing logic is configured to emit a ray into a world space acceleration structure if the traversal of a reduced acceleration structure results in a miss for the ray.
18 . The ray tracing unit of claim 16 , further comprising processing logic configured to use results of said intersection testing for rendering an image of the 3D scene.
19 . The ray tracing unit of claim 16 , further comprising pre-processing logic configured to:
perform pre-processing on primitives in the 3D scene, wherein the pre-processing includes one or both of clipping and transforming the primitives into view space or clip space; and
provide the pre-processed primitives to the processing module.
20 . A non-transitory computer readable storage medium having stored thereon computer readable code which when executed causes at least one processor to generate one or more separate reduced acceleration structures for use by a ray tracing system in intersection testing for processing a 3D scene, by:
determining nodes of the one or more separate reduced acceleration structures, wherein each of the one or more separate reduced acceleration structures represents a respective sub-region within the 3D scene rather than representing the whole 3D scene, wherein the respective sub-regions are determined without dependence on rays to be tested against them; and
storing in a computer readable memory the one or more separate reduced acceleration structures for use in intersection testing.