Accelerated bounding volume hierarchy (BVH) traversal for ray tracing

By sorting the nodes of the hierarchical acceleration data structure in ray tracing technology and optimizing the ray traversal sequence, the problem of high complexity of ray tracing calculation in the existing technology is solved, and more efficient ray tracing and better real-time performance is achieved.

CN119923669APending Publication Date: 2025-05-02QUALCOMM INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380065172.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-09-23
Filing Date
2023-09-06
Publication Date
2025-05-02

AI Technical Summary

Technical Problem

Existing ray tracing technologies are highly computationally complex in real-time rendering, making it difficult to achieve efficient ray tracing, especially when increasing the number of rays cast into the scene per frame.

Method used

By sorting nodes using sort parameter values ​​in a hierarchical acceleration data structure, the order of ray traversal is optimized, thereby improving the efficiency of ray tracing. The specific method includes obtaining primitives and related information values ​​in the hierarchical acceleration data structure, determining the sort parameter value based on these information values, and using these sort parameter values ​​to sort nodes at the same level, and finally traversing the hierarchical acceleration data structure using sort order.

Benefits of technology

By optimizing the order of ray traversals, the calculation time of each ray tracing operation is reduced, allowing more ray tracing operations to be performed within the same fixed rendering time per frame, thereby improving image quality and real-time performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119923669A_ABST
    Figure CN119923669A_ABST
Patent Text Reader

Abstract

Systems and techniques for accelerating ray tracing are provided. For example, a process may include obtaining a hierarchical acceleration data structure comprising a plurality of primitives of a scene object; and obtaining a respective information value associated with each primitive included in the plurality of primitives. An ordering order may be determined for two or more nodes included in the same hierarchy of the hierarchical acceleration data structure, at least in part, by ordering the two or more nodes based on respective ordering parameter values determined for each respective one of the two or more nodes. Each respective ranking parameter value may be determined based on at least one information value associated with one or more primitives included in a sub-tree of each respective one of the two or more nodes. The hierarchical acceleration data structure may be traversed using the sort order.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure generally relates to graphics processing. For example, aspects of the present disclosure relate to systems and techniques for accelerating traversal of a hierarchical acceleration data structure for ray tracing. Background Art

[0002] Ray tracing is a computer graphics technique that can be used to generate images by tracing the path of light through a three-dimensional scene, simulating interactions with objects illuminated by the light source, and determining ray intersections. Ray intersections can include ray-primitive intersections or ray-object intersections. Primitives are geometric entities that can be used to construct or model larger three-dimensional objects. For example, primitives can include triangles or polygons.

[0003] Ray tracing can be used to generate realistic images of three-dimensional scenes, including shadows. Scene geometry can be stored in acceleration data structures that group scene primitives. Acceleration data structures can be used to speed up the process of ray tracing by improving the efficiency of ray intersection tests and / or calculations. For example, a bounding volume hierarchy (BVH) is an acceleration data structure that can group scene primitives in a hierarchical tree of bounding volumes that encapsulate one or more of the scene primitives. Ray tracing can be performed by traversing these hierarchical structures to determine ray-primitive and / or ray-object intersections. Summary of the invention

[0004] In some examples, systems and techniques are described for accelerating traversal of a hierarchical acceleration data structure for ray tracing. For example, the systems and techniques may be used to provide accelerated ray traversal for traversing a bounding volume hierarchy (BVH) based on obtaining one or more information values ​​associated with each of a plurality of primitives included in the BVH. In some examples, the systems and techniques may be used to provide accelerated ray traversal (e.g., for traversing a BVH) for primary rays, shadow rays, reflection rays, and / or refracted rays. According to at least one illustrative example, a method for ray tracing is provided, the method comprising: obtaining a hierarchical acceleration data structure comprising a plurality of primitives of a scene object; obtaining a corresponding information value associated with each primitive included in the plurality of primitives; determining a sorting order of two or more nodes included in the same level of the hierarchical acceleration data structure at least in part by sorting the two or more nodes included in the same level of the hierarchical acceleration data structure based on a corresponding sorting parameter value determined for each corresponding node of the two or more nodes, wherein each corresponding sorting parameter value is based on at least one information value associated with one or more primitives included in a subtree of each corresponding node of the two or more nodes; and traversing the hierarchical acceleration data structure using the sorting order.

[0005] In another example, an apparatus for ray tracing is provided, the apparatus comprising a memory (e.g., configured to store data, such as graphics data, one or more images, etc.) and one or more processors (e.g., implemented in a circuit) coupled to the memory. The one or more processors are configured and can: obtain a hierarchical acceleration data structure, the hierarchical acceleration data structure comprising a plurality of primitives of a scene object; obtain a corresponding information value associated with each primitive included in the plurality of primitives; determine a sorting order of two or more nodes included in a same level of the hierarchical acceleration data structure at least in part by sorting the two or more nodes included in the same level of the hierarchical acceleration data structure based on a corresponding sorting parameter value determined for each respective node of the two or more nodes, wherein each respective sorting parameter value is based on at least one information value associated with one or more primitives included in a subtree of each respective node of the two or more nodes; and traverse the hierarchical acceleration data structure using the sorting order.

[0006] In another example, a non-transitory computer-readable medium having instructions stored thereon is provided, which instructions, when executed by one or more processors, cause the one or more processors to: obtain a hierarchical acceleration data structure, the hierarchical acceleration data structure including multiple primitives of a scene object; obtain a corresponding information value associated with each primitive included in the multiple primitives; determine a sorting order of the two or more nodes included in the same level of the hierarchical acceleration data structure at least in part by sorting the two or more nodes included in the same level of the hierarchical acceleration data structure based on corresponding sorting parameter values ​​determined for each corresponding node of the two or more nodes, wherein each corresponding sorting parameter value is based on at least one information value associated with one or more primitives included in a subtree of each corresponding node of the two or more nodes; and traverse the hierarchical acceleration data structure using the sorting order.

[0007] In another example, an apparatus for ray tracing is provided. The apparatus includes: a component for obtaining a hierarchical acceleration data structure, the hierarchical acceleration data structure including a plurality of primitives of a scene object; a component for obtaining a corresponding information value associated with each primitive included in the plurality of primitives; a component for determining a sorting order of two or more nodes included in a same level of the hierarchical acceleration data structure at least in part by sorting the two or more nodes included in the same level of the hierarchical acceleration data structure based on a corresponding sorting parameter value determined for each corresponding node in the two or more nodes, wherein each corresponding sorting parameter value is based on at least one information value associated with one or more primitives included in a subtree of each corresponding node in the two or more nodes; and a component for traversing the hierarchical acceleration data structure using the sorting order.

[0008] In some aspects, one or more of the above-mentioned devices are or are part of: a camera, a mobile device (e.g., a mobile phone or so-called "smart phone" or other mobile device), a vehicle or a computing system or device of a vehicle, a wearable device, an extended reality device (e.g., a virtual reality (VR) device, an augmented reality (AR) device, or a mixed reality (MR) device), a personal computer, a laptop computer, a server computer, or other device. In some aspects, a device includes one or more cameras for capturing one or more images. In some aspects, the device also includes a display for displaying one or more images, notifications, and / or other displayable data. In some aspects, the device may include one or more sensors that can be used to determine the position and / or posture of the device, the state of the device, and / or for other purposes.

[0009] This summary is not intended to identify key or essential features of the claimed subject matter, nor is it intended to be used in isolation to determine the scope of the claimed subject matter. The subject matter should be understood by reference to appropriate portions of the entire specification of this patent, any or all drawings, and each claim.

[0010] The foregoing and other features and aspects will become more apparent upon reference to the following description, claims and accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Exemplary aspects of the present application are described in detail below with reference to the following drawings:

[0012] Figure 1A An example of a ray tracing process according to some examples is illustrated;

[0013] Figure 1B illustrates an example of a ray tracing process including one or more shadow rays according to some examples;

[0014] Figure 1C An example of a ray tracing process including one or more occluded shadow rays according to some examples is illustrated;

[0015] Figure 2A illustrates an example of a bounding volume including one or more primitives representing portions of a surface in a scene according to some examples;

[0016] Figure 2B illustrates the organization according to some examples Figure 2A An example of a bounding volume hierarchy (BVH) of a bounding volume;

[0017] Figure 3A An example of a scene object and an object space bounding volume encapsulating the scene object according to some examples is illustrated;

[0018] Figure 3B The encapsulation according to some examples is illustrated Figure 3A An example of object space bounding volumes for and world space bounding volumes for scene objects;

[0019] Figure 4A illustrates an example of an acceleration data structure including a top-level acceleration structure (TLAS) and a bottom-level acceleration structure (BLAS) according to some examples;

[0020] Figure 4B illustrates an example of an acceleration data structure including leaf nodes containing triangles and leaf nodes containing bounding volumes according to some examples;

[0021] Figure 5 is a simplified block diagram illustrating an example ray tracing system according to some examples;

[0022] Fig. 6A illustrates examples of acceleration data structures that may be used for ray traversal and intersection according to some examples;

[0023] Figure 6B illustrates an example of an acceleration data structure including one or more information values ​​associated with each respective primitive of a plurality of primitives included in the acceleration data structure according to some examples;

[0024] Figure 7 illustrates an example of an updated acceleration data structure in which one or more nodes are sorted into a sorted order based on a corresponding sort parameter value associated with each node according to some examples;

[0025] Figure 8 is a flowchart illustrating an example of a process for graphics processing according to some examples of the present disclosure; and

[0026] Fig. 9 is a block diagram illustrating an example of a computing system for implementing certain aspects described herein. DETAILED DESCRIPTION

[0027] Certain aspects of the present disclosure are provided below. Some of these aspects may be applied independently, and some of them may be applied in combination, which is obvious to those skilled in the art. In the following description, specific details are set forth for explanation purposes to provide a thorough understanding of various aspects of the application. However, it is apparent that various aspects may be implemented without these specific details. Each of the drawings and description is not intended to be restrictive.

[0028] The following description provides only example aspects and is not intended to limit the scope, applicability or configuration of the present disclosure. On the contrary, the following description of the example aspects will provide a description that can be used to implement the example aspects to those skilled in the art. It should be understood that various changes can be made to the function and arrangement of elements without departing from the essence and scope of the present application as set forth in the appended claims.

[0029] Ray tracing is a graphics processing and rendering technique that can be used to produce photo-realistic images by modeling the transport of light to simulate optical effects. Ray tracing can realistically simulate the lighting of a three-dimensional (3D) scene and its objects by rendering physically correct reflections, refractions, shadows, and / or indirect lighting in a two-dimensional (2D) view of the scene.

[0030] Ray tracing can be a computationally intensive technique. For example, the computational resources (e.g., computation time) used to ray trace a single frame can increase with the number of rays traced per frame and / or can increase with the computational resources (e.g., computation time) spent tracing each individual ray. Due to this computational complexity, ray tracing can generally be limited to non-real-time uses. Real-time ray tracing has long been sought for uses such as rendering video games, virtual reality (VR), and augmented reality (AR) experiences. Real-time ray tracing has recently become possible through the use of, for example, hardware accelerators and / or graphics processing units (GPUs), which can provide parallelization of the underlying computations for each individual ray cast into a scene.

[0031] The number of rays that can be cast into a scene for each frame is typically relatively small, since the rendering time for each frame cannot exceed a certain maximum amount without sacrificing real-time performance. By increasing the number of rays cast into a scene per frame, image quality when using real-time ray tracing can be improved. For example, the number of rays cast into a scene per frame can be increased by increasing parallelization (e.g., providing additional computing resources that allow more rays to be traced simultaneously). However, hardware upgrades can incur high upfront costs and may be difficult or impossible to retrofit to existing systems and platforms. A scalable and efficient solution is desired that can improve the real-time performance (e.g., image quality) of existing ray tracing hardware.

[0032] Described herein are systems, apparatus, processes (also referred to as methods), and computer-readable media (collectively, "systems and techniques") that can provide accelerated ray tracing operations for one or more rays. For example, as described in more detail herein, the systems and techniques can increase the number of rays cast into a scene per frame by more efficiently tracing each ray (e.g., reducing the computation time per ray tracing operation allows more ray tracing operations to be performed within the same fixed rendering time per frame). For example, the systems and techniques can increase the number of rays cast into a scene per frame based on more efficiently traversing a hierarchical acceleration data structure (e.g., a bounding volume hierarchy (BVH)) associated with the scene. In some examples, the systems and techniques can perform an accelerated hierarchical acceleration data structure (e.g., a BVH) based on sorting the hierarchical acceleration data structure using one or more information values ​​associated with each of a plurality of primitives included in the hierarchical acceleration data structure. The one or more rays can include primary rays, shadow rays, reflected rays, and / or refracted rays. In some examples, the systems and techniques can provide accelerated ray tracing operations that are accelerated based on the type of hierarchy that is traversed for ray intersection testing, based on the type of rays that are tested for intersection with the hierarchy, and / or based on a combination of both.

[0033] Various aspects of the application will be described with respect to the accompanying drawings.

[0034] Figure 1A 1 is a diagram illustrating an example of a ray tracing technique 100. As illustrated, a ray tracing system may perform ray tracing by projecting a plurality of rays (e.g., ray 152a, ray 152b, and ray 152c) from a virtual or imaginary view camera 110 (e.g., which determines a view into a 3D scene) through pixels 140 of a 2D view plane into a 3D scene. In some examples, rays 152a-152c may also be referred to as "primary rays." Each primary ray may pass through a particular one of pixels 140 (e.g., such as Figure 1A ). In some cases, when rendering a 3D scene, each primary ray may pass through a different one of pixels 140. Multiple rays may also be used for some (or all) of pixels 140. Then, after casting one or more of primary rays 152a-152c, the ray tracing system may trace the path of each primary ray to determine whether the ray returns to light source 120 in the 3D scene. Multiple different primary rays may be processed in parallel (e.g., because primary rays interact with various objects, surfaces, light sources, etc. in the 3D scene, but not with other primary rays).

[0035] In the example of the ray tracing technique 100, each of the primary rays 152a-152c originates from a virtual or imaginary view camera 110 (e.g., sharing a common origin) and is projected through a particular pixel of the plurality of pixels 140 located on a 2D view plane (e.g., as described above). In the event that a particular one of the primary rays 152a-152c reaches a light source (e.g., light source 120) in the 3D scene, then information from that ray contributes to the final color and / or illumination level of the pixel (e.g., from pixel 140) through which the particular ray is projected.

[0036] For example, when a ray projected into a scene intersects one or more objects (e.g., such as object 130), color and lighting information from the intersection on the surface of the object may contribute to the final color and lighting level of a pixel (e.g., pixel 140) associated with the ray (e.g., primary rays 152a to 152c). The color and lighting information may be determined based on whether the ray-object intersection is directly illuminated by a light source (e.g., light source 120) or is obscured (e.g., shaded). The color and lighting information of the ray-object intersection may be determined by casting one or more shadow rays from the ray-object intersection to a light source within the scene, as will be described in more depth below. If the shadow ray does not intersect an object on its path to the light source, the ray-object intersection (e.g., also referred to as a "hit point") is illuminated. If the shadow ray does intersect another object, the hit point may be obscured (e.g., an object intersected by the shadow ray may cast a shadow on the hit point). Similarly, different objects may have different surface properties that reflect, refract, and / or absorb light in different ways, which also contribute to the final pixel color and / or illumination level. For example, color and illumination information for a ray-object intersection may be determined additionally or alternatively based on projecting one or more reflected rays away from the surface at which the ray-object intersection is located. Light rays may also reflect from objects and hit other objects in the scene or travel through the surface of a transparent object, etc. before reaching a light source (e.g., light source 120). In some examples, color and illumination information for a ray-object intersection may be determined additionally or alternatively based on projecting one or more refracted rays through the surface at which the ray-object intersection is located.

[0037] For example, Figure 1A, a first primary ray 152a is cast into the scene and intersects the object 130, resulting in the generation of a first shadow ray 162a. The first shadow ray 162a is cast between the hit point (e.g., where the first primary ray 152a intersects the object 130) and the light source 120, and can be used to determine whether the hit point between the first primary ray 152a and the object 130 is directly illuminated by the light source 120 or is obscured by additional scene objects. As illustrated, the first shadow ray 162a reaches the light source 120, and thus can contribute color or lighting information for rendering a particular one of the pixels 140 through which the first primary ray 152 is cast. The intersection (e.g., hit point) between the first primary ray 152a and the object 130 can also be used to generate one or more reflected rays, such as Figure 1A . First reflected ray 156a does not reach light source 120, and therefore cannot directly contribute color or illumination information back to pixel 140. In some cases, first reflected ray 156a may intersect additional scene objects (not shown), and may contribute color and / or illumination information for these additional intersections between the reflected ray and one or more additional scene objects.

[0038] The intersection point (eg, hit point) between the first primary ray 152a and the object 130 may also be used to generate one or more reflected rays, such as Figure 1A 130 . The first refracted ray 152 is transmitted from a hit point on the surface of the object 130 and passes through the interior or closed volume of the object 130. The first refracted ray 172a may be associated with an angle of refraction entering the object 130 (e.g., relative to the angle of incidence of the principal ray 152a relative to the surface 130). In some cases, the angle of refraction and / or attenuation of the first refracted ray 172a when interacting with the object 130 may be based on one or more material properties of the object 130. Additional first refracted rays 174a may be generated at the intersection of the first refracted ray 172a with the surface of the object 130 through which the first refracted ray 172a exits (e.g., the hit point). Similar examples are described with respect to second refracted rays 172b and 174b, which may be generated based on the intersection (e.g., the hit point) between the second principal ray 152b and the surface of the object 130. When the refracted ray reaches a light source in the scene (e.g., light source 120), the refracted ray may contribute color or lighting information for rendering a particular pixel in pixels 140. If the refracted ray does not reach a light source in the scene, then in some cases the refracted ray may not contribute color or lighting information for rendering pixel 140.

[0039] The same or similar scenes are illustrated for the second primary ray 152b and the associated second shadow ray 162b (e.g., which reaches the light source 120) and the second reflected ray 156b (e.g., which does not reach the light source 120), and the third primary ray 152c and the associated third shadow ray 162c (e.g., which reaches the light source 120) and the third reflected ray 156c (which does not reach the light source 120).

[0040] Figure 1B 1 is a diagram illustrating another example of a ray tracing process 100b. Here, a primary ray 152 is projected through a pixel grid 140b and into a scene including an object 130. For example, primary ray 152 is projected from an origin / viewpoint through a particular pixel 141 (e.g., included in pixel grid 140b) and intersects object 130. A hit point or ray-object intersection point between primary ray 152 and object 130 is then used as an origin to generate and project shadow ray 162. As described above, shadow ray 162 may be projected from the hit point to light source 120. As shown in FIG. Figure 1B As depicted in , shadow ray 162 reaches light source 120 without intersecting any other objects or scene primitives, and illumination and color information for pixel 141 may be determined based on the hit point directly illuminated by light source 120 .

[0041] Figure 1C is a diagram illustrating another example of the ray tracing process 100 c . Figure 1C The diagram and Figure 1B , but with the addition of an additional object 135 (e.g., an additional scene primitive) along a direct path between a hit point (e.g., where the primary ray 152 intersects the object 130) and the light source 120. Here, when a shadow ray 164 is generated and cast from the hit point to the light source 120, the shadow ray 164 intersects the additional object 135 and does not reach the light source 120. Since the shadow ray 164 does not reach the light source 120, the hit point may be considered to be blocked or obscured by the additional object 135. For example, based on the intersection between the shadow ray 164 and the additional object 135, illumination and color information for the pixel 141 may be determined based on the hit point being blocked or obscured (e.g., blocked or obscured relative to the light source 120). In some examples, after a shadow ray is generated and cast in response to determining a hit point between the primary ray and a scene object / primitive, processing of the shadow ray may be terminated when the shadow ray intersects the light source or another scene primitive (e.g., whichever comes first).

[0042] As previously mentioned, each interaction between a ray and an object (e.g., a scene object, a primitive, a surface within a 3D scene, etc.) can contribute color and / or lighting information back to a particular pixel through which the primary ray is cast. In some cases, tracing a greater number of interactions per ray can provide increased visual fidelity (e.g., quality) of the rendered scene at the expense of increased computational cost (e.g., time). For example, a ray tracing method that prioritizes speed over quality may only calculate or otherwise determine the first reflection of each ray, while a ray tracing method that prioritizes quality over speed may determine three or more reflections per ray. In some cases, after observing a maximum number of reflections or a ray that travels a certain distance without intersection, the ray may stop traveling and the value of the pixel may be updated. In some cases, the ray may stop traveling and the value of the pixel may be updated based on the ray that travels a certain distance without reflection (e.g., reflection is one possible result of intersection). In some cases, the number of rays cast through each pixel of the 2D viewing plane may be adjusted based on a similar tradeoff between computational cost and visual fidelity.

[0043] As a result, ray tracing becomes very expensive in terms of the time and / or computing power required to render realistic-looking scenes, based on, for example, the number of rays cast into a scene and the number of additional rays traced for secondary reflections and refractions. Due to this computational complexity, ray tracing is typically limited to non-real-time uses (e.g., scenes or visual effects that may be pre-rendered for film and television). Real-time ray tracing has long been sought for use cases such as rendering video games, virtual reality (VR), and augmented reality (AR) experiences, etc.

[0044] Real-time ray tracing has recently become possible, and is typically performed by hardware accelerators and / or graphics processing units (GPUs), which can provide parallelization of the underlying calculations for each individual ray cast into the scene. The number of rays that can be cast into the scene for each frame is typically relatively small, since the rendering time per frame cannot exceed a certain maximum amount without losing real-time performance.

[0045] Image quality when using real-time ray tracing can be improved by increasing the number of rays cast into the scene per frame. This can be achieved by increasing parallelization (e.g., providing additional computing resources that allow more rays to be traced simultaneously). However, hardware upgrades come with high upfront costs and may be difficult or impossible to retrofit to existing systems and platforms. A scalable and efficient solution is desired that can improve the real-time performance of existing ray tracing hardware. For example, the number of rays cast into the scene per frame can also be increased by tracing each ray more efficiently (e.g., reducing the computation time per ray tracing operation allows more ray tracing operations to be performed within the same fixed rendering time per frame).

[0046] One example of a ray tracing acceleration technique utilizes a tree-based acceleration structure to improve the efficiency of ray intersection testing (e.g., also referred to as "collision testing" and / or "hit testing") and / or other ray tracing operations. For example, ray intersection testing may include, but is not limited to, determining whether a primary ray intersects one or more scene objects or primitives (e.g., after the primary ray is cast into the scene); determining whether a shadow ray intersects additional scene objects or primitives (e.g., after the shadow ray is cast from the primary ray hit point to the light source); and determining whether a reflected ray intersects additional scene objects or primitives (e.g., after the reflected ray is cast from the hit point, using a calculated reflection angle); and / or determining whether a refracted ray intersects additional scene objects or primitives (e.g., after the refracted ray is cast through the surface of the hit point, using a calculated refraction angle).

[0047] The scene can be converted into a bounding volume hierarchy (BVH), which is a hierarchical tree structure composed of increasingly dense bounding volumes (also called "bounding regions", such as bounding boxes or "axis-aligned bounding boxes" (AABB)). For example, Figure 2A An example is illustrated in which a scene 200a containing a plurality of triangle primitives 252a-252e is arranged into a series of increasingly tight bounding boxes 256a-256e. The scene may contain hundreds, thousands, or more primitives, but for clarity, only five triangle primitives 252a-252e are depicted. The bounding boxes 256a-256e may be AABBs, which are bounding boxes with a minimum area or volume within which all points of the enclosed primitives (e.g., triangle primitives 252a-252e) may be located. The bounding boxes may be axis-aligned so that the edges of each bounding box 256a-256e are parallel to coordinate axes (e.g., x-axis, y-axis, and z-axis). Figure 2B Illustrated with Figure 2A256a-256e and triangle primitives 252a-252e are associated with each other. The hierarchical data structure 200b may be a BVH. For example, the BVH root node 262a may correspond to Figure 2A Similarly, the intermediate BVH node 262b may correspond to Figure 2A The bounding box 256b of the intermediate BVH node 262c may correspond to Figure 2A The bounding box 256c, and so on.

[0048] BVH root node (e.g., Figure 2B The BVH root node 262a) contains the AABB (e.g., Figure 2A The BVH leaf node is populated with a bounding box 256a) that encapsulates all individual scene or object geometries contained in the BVH leaf node. Each primitive in the BVH root node is assigned to a left child or a right child. The child nodes contain AABBs that contain their assigned geometry, and the geometry is likewise recursively assigned to the left child or the right child until the BVH leaf node contains a small number of primitives, such as four or fewer. Depending on the extent of any scene changes and / or object deformations, the next frame and any subsequent frames may require one or more new BVH build operations or BVH reassembly / update operations based on the scene changes.

[0049] As mentioned previously, testing the intersection of each ray for each primitive in the scene may be inefficient and computationally expensive. BVH can be used to accelerate ray intersection testing techniques, as well as other ray tracing operations. For example, BVH can be used to efficiently traverse during collision checks associated with primary rays, shadow rays, reflected rays, refracted rays, etc. Instead of testing for each primitive in the scene, the intersection of each ray can be measured for a BVH bounding box (e.g., using a depth-first tree traversal process, such as a depth-first search (DFS) traversal, etc.). As mentioned previously, the bounding box encloses or surrounds different amounts of scene geometry or primitives and becomes increasingly tighter with the depth of the BVH tree structure.

[0050] Bounding boxes (e.g., AABBs or other bounding boxes) or other bounding regions can be defined relative to world space or object space. World space can be thought of as a constant (e.g., the coordinate space of the entire 3D scene). Objects can exist in their own coordinate space, which is called object space (e.g., the coordinate space in which the object is modeled or created). For example, Figure 3A and Figure 3B is a diagram that depicts object space and world space AABBs (axis-aligned bounding boxes) for the same geometry. Here, Figure 3AAn object space AABB 320 of a geometric scene object 310 is illustrated. A scene object may include a 3D or graphical object that exists in a 3D scene on which ray tracing is performed. In some cases, a geometric scene object may be a scene object that includes geometric primitives such as triangles. In some examples, a scene object may include an AABB or other object representation. Object space AABB 320 and scene object 310 are shown in object space 300a of scene object 310. Figure 3B The same geometric scene object 310 is illustrated, but transformed into the world space 300b of a scene (eg, a scene to which the scene object 310 belongs or is located).

[0051] Ray tracing can utilize a two-level acceleration structure system, such as the top-level acceleration structure (TLAS) and the bottom-level acceleration structure (BLAS), such as Figure 4A For example, Figure 4A TLAS 410 and BLAS 430 are illustrated and will be described in more depth below.

[0052] TLAS 410 is constructed in world space. TLAS primitives are instances of BLAS, which are defined in object space. TLAS can be constructed as a BVH whose leaf nodes contain BLAS. For example, TLAS leaf nodes 422, 424, 426 and 428 each contain one of the two BLAS 440 and 460 or are otherwise associated with it. Translation matrices can be encoded in TLAS leaf nodes to perform conversions from world space to object space and / or vice versa, as described in more depth below.

[0053] A BLAS can be constructed for each object in the scene (called a scene object). For example, Figure 4A A BLAS 440 that may be constructed for a first unique scene object and a BLAS 460 that may be constructed for a second unique scene object are illustrated. The BLAS primitives may be triangles or AABBs that are procedural primitives used to construct the scene objects. An underlying BVH is constructed on a collection of these triangles or AABBs of scene objects, where each BLAS leaf node contains a small number (e.g., up to four, five, or some other number) of triangles or AABBs. For example, in Figure 4A In the context of , BLAS leaf nodes 452-458 and 472-478 may each contain some number of triangles, AABBs, or other primitives used to construct scene objects. In some examples, the BLAS may also be referred to as a "bottom layer BVH". Multiple instances of the same BLAS may be included in a TLAS. For example, if the TLAS includes a car object, the BLAS for the tires may be included four times. Figure 4A As illustrated in , the same BLAS may also be included in or referenced by multiple TLASs.

[0054] In some examples, a TLAS may be created using an object-to-world matrix that transforms inputs expressed in object space coordinates to outputs expressed in world space coordinates. The world-to-object matrix may apply the transformation in the opposite direction (e.g., transforming inputs expressed in world space coordinates to outputs expressed in object space coordinates). In some cases, a TLAS may be constructed on a set of BLASs by using the object-to-world matrix to compute the world space AABBs of each BLAS (e.g., the world space AABBs of BLAS root nodes 442 and 462). A BVH is then constructed on these world space AABBs of the BLAS root nodes, and the BVH may be referred to as a top-level BVH or TLAS 410. In some cases, similar or identical techniques may be used to perform TLAS and BLAS creation. For example, the same SAH (surface area heuristic) based algorithm or method may be used for both TLAS and BLAS construction.

[0055] Figure 4B 4 is a diagram illustrating an example of an acceleration data structure 400b that includes or stores both triangles and bounding volumes. In some examples, the acceleration data structure 400b may be a BVH (e.g., Figure 4B ), but it should be noted that other hierarchical tree structures and / or other acceleration data structures may also be utilized. Figure 4B As illustrated in FIG. 4 , the acceleration data structure 400 b (e.g., BVH) includes a BVH root node 460, which includes a plurality of bounding volumes 471-478. The bounding volumes 471-478 may correspond to or be otherwise constructed for child nodes of the BVH root node 460. For example, eight bounding volumes 471-478 may be AABBs of eight corresponding child nodes of the BVH root node 460.

[0056] exist Figure 4BIn the example of , acceleration data structure 400b has a branching factor of eight. The branching factor of an acceleration data structure is the maximum number of child nodes that can be associated with or contained by any parent node within the acceleration data structure. The number of child nodes associated with some internal nodes may be less than the branching factor. For example, acceleration data structure 400b has a branching factor of eight, but some internal nodes within acceleration data structure 400b may have less than eight child nodes. It should be noted that larger or smaller branching factors may also be used to generate acceleration structures, such as acceleration data structure 400b. In the case where acceleration data structure 400b uses a larger or smaller branching factor, the BVH root node 460 and / or BVH internal nodes (e.g., shown here as BVH internal nodes 471-478) may also include a greater or lesser number of bounding volumes or AABBs.

[0057] As mentioned above, BVH root node 460 includes the AABBs of its eight child nodes 471-478. In some examples, the AABBs of child nodes 471-478 may be stored in a data structure of BVH 400b (e.g., included in the information representation of the parent node). For example, BVH root node 460 may include an index to a data storage or memory location where one or more of its child nodes 471-478 may be obtained or retrieved. In an illustrative example, BVH root node 460 includes an index to only the first child node (e.g., BVH internal node 471), with the remaining child nodes (e.g., nodes 472-478) stored adjacent to the memory index of the first child node 471.

[0058] Child node 471 is Figure 4B 471 is depicted as a BVH internal node 471 because node 471 is neither a root nor a leaf of BVH 400b. An internal node of BVH 400b (e.g., such as node 471) may have a number of child nodes that is less than or equal to the branching factor, which is eight for BVH 400b. In some examples, an internal BVH node (e.g., such as node 471) may contain a bounding volume or AABB for each of its child nodes, as previously described with respect to BVH root node 460. BVH internal node 471 includes a plurality of bounding volumes 481-488, which in this case represent the eight child nodes of internal node 471. Figure 4B As illustrated in , the child nodes of internal node 471 are BVH leaf nodes (eg, leaf nodes of BVH acceleration data structure 400b).

[0059] For example, the child nodes of internal node 471 include BVH leaf node 481 and BVH leaf node 482 (internal node 471 includes additional child nodes 483-488, which are separated from each other for clarity). Figure 4BThe leaf node layer of the BVH 400b omits these additional child nodes). As illustrated, the BVH leaf node 481 includes two triangles 481a and 481b, which are geometric primitives that can be used to construct the scene object or model represented by the BVH 400b. In some cases, the triangles 481a-481b can be encapsulated by corresponding AABBs stored in the internal nodes 471 of the BVH leaf node 481. In an illustrative example, the coordinates of the triangles 481a-481b can be directly stored in the underlying data structure of the BVH 400b, rather than being retrieved from an external data storage or data location. For example, the coordinates (e.g., vertices) of the triangles 481a-481b can be stored in the BVH leaf node 481 itself.

[0060] Figure 4B BVH leaf node 482 is depicted as including four bounding volumes (e.g., AABBs) 482a, 482b, 482c, and 482d. In one illustrative example, bounding volumes 482a-482d may be AABBs of program primitives (e.g., representing spheres or other user-defined shapes). In some examples, bounding volumes 482a-482d may be AABBs of instances of the BVH. As described above with respect to BVH leaf node 481, it should be noted that the four bounding volumes 482a-482d may be encapsulated by corresponding AABBs stored in internal node 471 of BVH leaf node 472. Although Figure 4B BVH internal node 471 is depicted as including child nodes containing triangles (e.g., BVH leaf node 481) and child nodes containing bounding volumes (e.g., BVH leaf node 482), but in some examples, the BVH acceleration data structure 400b as a whole may include only leaf nodes containing triangles or may include only leaf nodes containing bounding volumes.

[0061] As previously mentioned, a BVH can store scene geometry (e.g., primitives) in a hierarchical grouping structure that can be used to speed up the process of ray tracing by improving the efficiency of ray intersection testing. In some aspects, the same BVH can be used to perform ray intersection testing for primary rays (e.g., testing the primary ray for intersection with one or more primitives) and perform ray intersection testing for shadow rays (e.g., testing the shadow ray for intersection with a light source or any opaque primitives included in the scene). In some aspects, the same BVH can additionally be used to perform ray intersection testing for reflected rays and / or refracted rays.

[0062] A chief ray intersection test (e.g., among other types of ray intersection tests) may be performed based on a depth-first search (DFS) traversal of the BVH and / or other traversal techniques, where BVH nodes closer to the virtual camera (e.g., the origin of the chief ray) are traversed first. In some cases, the chief ray BVH traversal may terminate after a maximum number of intersections and / or reflections associated with the chief ray are observed. The chief ray BVH traversal may additionally or alternatively terminate based on the chief ray traveling a certain distance without intersecting.

[0063] In what may also be referred to as "early shadow ray termination," the shadow ray BVH traversal may be terminated once the shadow ray intersects any opaque primitive included in the scene, or once the shadow ray intersects the corresponding light source for which the shadow ray was generated. In some examples, when the shadow ray BVH traversal is also performed based on the distance from the virtual camera based on visiting BVH nodes (e.g., when the same BVH traversal technique as in the main ray intersection test is used), the efficiency and / or performance of the shadow ray collision test may be reduced.

[0064] In some examples, the reflected ray intersection test may be performed as a principal ray intersection test (e.g., to determine whether the reflected ray intersects any scene objects or scene primitives). In some examples, the reflected ray intersection test may be performed as a shadow ray intersection test (e.g., to determine whether the reflected ray reaches a light source). In some cases, the refracted ray intersection test may be performed as a principal ray intersection test (e.g., to determine whether the refracted ray intersects any scene objects or scene primitives) and / or may be performed as a shadow ray intersection test (e.g., to determine whether the refracted ray reaches a light source).

[0065] What is needed are systems and techniques that can be used to perform shadow ray intersection testing with improved BVH traversal efficiency.

[0066] As described above, systems and techniques are described herein that can provide accelerated ray tracing operations to accelerate traversal of hierarchical acceleration data structures for ray tracing. An acceleration data structure is a data structure that can be used to store scene geometry (e.g., triangles and other primitives). For example, scene geometry and / or primitives can be grouped and stored at various levels (e.g., hierarchies) of an acceleration data structure. For example, a bounding volume hierarchy (BVH) is an acceleration data structure that can group scene primitives in a hierarchical tree of bounding volumes that encapsulate one or more scene primitives in the scene primitives. Ray tracing can be performed by traversing these hierarchical structures to determine ray-primitive and / or ray-object intersections. In some examples, the system and techniques can be used to provide accelerated ray traversal for traversing a bounding volume hierarchy (BVH). The BVH may include a plurality of primitives organized in a hierarchical tree structure, wherein the plurality of primitives are included in leaf nodes of the hierarchical tree structure. The BVH hierarchical tree structure may include a plurality of nodes (e.g., including leaf nodes) organized into one or more different hierarchical levels.

[0067] In some aspects, accelerated ray traversal may be performed based on obtaining one or more information values ​​associated with each of a plurality of primitives included in a BVH. In some examples, the systems and techniques may be used to provide accelerated ray traversal (e.g., for traversing a BVH) for primary rays, shadow rays, reflected rays, and / or refracted rays. In some aspects, the optimal BVH traversal techniques for different types of rays may be different. For example, when the primary ray BVH traversal is based on a depth-first search (DFS) traversal of an implementation BVH, the primary ray BVH traversal may achieve optimal performance if the BVH node closest to the virtual camera viewpoint is traversed first. In another example, when the shadow ray BVH traversal is based on a DFS traversal of an implementation BVH, the shadow ray BVH traversal may achieve optimal performance if the BVH node associated with the maximum probability of intersecting opaque primitives is traversed first.

[0068] In some examples, the systems and techniques may provide accelerated ray tracing operations that are accelerated based on the type of hierarchical structure being traversed for ray intersection testing, based on the type of rays being tested for intersection with the hierarchical structure, and / or based on a combination of the two. In an illustrative example, the systems and techniques may perform a ray BVH traversal using one or more information values ​​associated with each of a plurality of primitives included in the BVH to determine a sorting parameter value for each node included in the BVH. The sorting parameter values ​​may be used to determine a sorting order such that traversal of the BVH is accelerated when the traversal is performed using the sorting order. For example, the BVH traversal may use the sorting parameter values ​​to prioritize access to BVH nodes, which may provide ray intersection results more quickly.

[0069] For example, primary ray BVH traversals can be accelerated by providing information values ​​for a plurality of primitives to the systems and techniques that cause the resulting sorting parameter values ​​to prioritize visits to BVH nodes that are closest to a virtual camera viewpoint (e.g., during traversal) and, therefore, can result in primary ray-primitive intersections more quickly. Shadow ray BVH traversals can be accelerated by providing information values ​​for a plurality of primitives to the systems and techniques that cause the resulting sorting parameter values ​​to prioritize visits to BVH nodes that have the greatest probability of generating shadow ray opaque primitive intersections (e.g., during traversal). Reflection ray BVH traversals and / or refraction ray BVH traversals can be accelerated using a similar method of selecting information values ​​for a plurality of primitives based on selecting information values ​​that will cause the systems and techniques to generate sorting parameter values ​​that prioritize visits to BVH nodes that are most likely to result in reflection ray intersection results and / or refraction ray intersection results, respectively (e.g., during traversal).

[0070] Figure 5 is a diagram illustrating an example ray tracing system 500 according to some examples of the present disclosure. The ray tracing system 500 can implement the systems and techniques disclosed herein, including the aspects described above and related FIG. 6A to FIG. 7 The ray tracing system 500 may perform various tasks and operations, such as, for example, ray tracing tasks and operations (e.g., ray-primitive intersection, ray-bounding volume intersection, ray-triangle intersection, ray-AABB intersection, acceleration data structure construction and / or updating, rendering, etc.).

[0071] exist Figure 5 In the example shown, the ray tracing system 500 includes a storage device 502, a computing component 510, a ray tracing engine 520, an acceleration data structure engine 522, a node acquisition and cache engine 524, and a graphics processing engine 526. It should be noted that Figure 5 The components 502 to 526 shown are non-limiting examples provided for purposes of illustration and explanation, and other examples may include Figure 5 More, fewer, and / or different components than those shown may be included. For example, in some cases, ray tracing system 500 may include Figure 5 One or more display devices, one or more other processing engines, one or more other hardware components, and / or one or more other software and / or hardware components not shown. Fig. 9 An example architecture and example hardware components that may be implemented by ray tracing system 500 are further described.

[0072] Reference to any of the components of ray tracing system 500 in the singular or plural should not be construed as limiting the number of such components implemented by ray tracing system 500 to one or more than one. For example, reference to a processor in the singular should not be construed as limiting the number of processors implemented by ray tracing system 500 to one. One of ordinary skill in the art will recognize that reference to a processor in the singular is not limited to one. Figure 5 , ray tracing system 500 may include only one of such components or more than one of such components.

[0073] Ray tracing system 500 may be part of or implemented by a single computing device or multiple computing devices. In some examples, ray tracing system 500 may be part of an electronic device (or devices) such as a desktop computer, a laptop or notebook computer, a tablet computer, a set-top box, a smart TV, a display device, a game console, a video streaming device, an IoT (Internet of Things) device, a smart wearable device (e.g., a head-mounted display (HMD), smart glasses, an extended reality (XR) device (e.g., a VR headset or head-mounted display (HMD), an AR headset, HMD or glasses, etc.), or any other suitable electronic device.

[0074] In some implementations, the storage device 502, the computing component 510, the ray tracing engine 520, the acceleration data structure engine 522, the node acquisition and cache engine 524, and the graphics processing engine 526 can be part of the same computing device. For example, in some cases, the storage device 502, the computing component 510, the ray tracing engine 520, the acceleration data structure engine 522, and the graphics processing engine 526 can be integrated into a smart phone, a laptop computer, a tablet computer, a smart wearable device, a gaming system, and / or any other computing device. In other implementations, the storage device 502, the computing component 510, the ray tracing engine 520, the acceleration data structure engine 522, and the graphics processing engine 526 can be part of two or more separate computing devices. For example, in some cases, some of the components 502 to 526 can be part of or implemented by one computing device, and the remaining components can be part of or implemented by one or more other computing devices.

[0075] Storage 502 may be any storage device for storing data. In addition, storage 502 may store data from any of the components of ray tracing system 500. For example, storage 502 may store data from computing component 510, data from ray tracing engine 520, data from acceleration data structure engine 522, data from node acquisition and cache engine 524, and / or data from graphics processing engine 526. In some examples, storage 502 may include one or more buffers and / or caches for storing data for processing by computing component 510. In some examples, one or more buffers and / or caches may be general and available for use by some (or all) of computing components 510. In some examples, one or more buffers and / or caches may be provided for specific computing components in computing component 510.

[0076] The computing component 510 may include a central processing unit (CPU) 512, a graphics processing unit (GPU) 514, a memory 516, a ray tracing unit 518, and / or one or more hardware accelerator components 519. In some implementations, the computing component 510 may include other processors or computing components, such as one or more digital signal processors (DSPs), one or more neural processing units (NPUs), and / or other processors or computing components. The computing component 510 may perform various operations, such as ray-primitive intersection, ray-bounding volume intersection, ray-AABB intersection, acceleration data structure construction, acceleration data structure update, scene rendering, rasterization, geometry processing, pixel processing, visibility processing, etc.

[0077] Operations for the ray tracing engine 520, the acceleration data structure engine 522, the node acquisition and cache engine 524, and the graphics processing engine 526 (as well as any other processing engines) may be implemented by any of the computing components 510. In some cases, operations of one or more of the ray tracing engine 520, the acceleration data structure engine 522, the node acquisition and cache engine 524, and the graphics processing engine 526 may be performed by the CPU 512. In one illustrative example, operations of one or more of the ray tracing engine 520, the acceleration data structure engine 522, the node acquisition and cache engine 524, and the graphics processing engine 526 may be performed by the GPU 514. In some cases, operations of one or more of the ray tracing engine 520, the acceleration data structure engine 522, the node acquisition and cache engine 524, and the graphics processing engine 526 may be performed by the RTU 518 and / or one or more hardware accelerators 519.

[0078] In some cases, operations of one or more of ray tracing engine 520, acceleration data structure engine 522, node fetch and cache engine 524, and graphics processing engine 526 may be performed by one or more combinations of CPU 512, GPU 514, RTU 518, and hardware accelerator 519. In some cases, computing component 110 may include other electronic circuitry or hardware, computer software, firmware, or any combination thereof to perform any of the various operations described herein.

[0079] In some examples, the ray tracing engine 520 may include one or more ray tracing application programming interfaces (APIs). In one example, the ray tracing engine 520 may include one or more ray intersection engines. For example, the ray tracing engine 520 may include one or more ray-primitive intersection engines and / or may include one or more ray-bounding volume intersection engines. In some cases, the ray tracing engine 520 may include one or more ray-triangle intersection engines and / or may include one or more ray-AABB intersection engines. For example, the ray tracing engine 520 may use one or more hardware accelerated ray tracing engines (RTUs) and / or arithmetic logic units (ALUs) to implement the one or more ray intersection engines.

[0080] In one illustrative example, the ray tracing engine 520 may communicate with the RTU 518 (and / or the hardware accelerator 519) to perform ray-primitive (e.g., ray-triangle) intersections and / or ray-bounding volume (e.g., ray-AABB) intersections. For example, in some cases, the ray tracing engine 520 may provide one or more input and / or control signals to the RTU 518 (and / or the hardware accelerator 519). The RTU 518 (and / or the hardware accelerator 519) may use the input and control signals from the ray tracing engine 520 to perform ray-primitive intersections and / or ray-bounding volume intersections, and may communicate ray intersection results back to the ray tracing engine 520.

[0081] In some examples, the acceleration data structure engine 522 may construct or generate one or more acceleration data structures. The acceleration data structure generated by the acceleration data structure engine 522 may be used by one or more of the ray tracing engine 520, the node acquisition and cache engine 524, and the graphics processing engine 526. In an illustrative example, the acceleration data structure engine 522 may construct or generate a bounding volume hierarchy (BVH). In some cases, the acceleration data structure engine 522 may generate a two-level acceleration structure (e.g., an acceleration data structure including a TLAS and one or more BLAS). The acceleration data structure engine 522 may be implemented using the CPU 512, the GPU 514, or a combination of the two. In some examples, the acceleration data structure engine 522 may be implemented additionally or alternatively using one or more dedicated hardware accelerator components in the dedicated hardware accelerator component 519.

[0082] In some examples, the graphics processing engine 526 may include a graphics processing pipeline. For example, the graphics processing engine 526 may include, but is not limited to, one or more of a geometry processing stage, a visibility stage, a rasterization stage, and a pixel processing pipeline. In some examples, the graphics processing engine 526 may communicate with or access a memory 516 of the computing component 510. The memory 516 may include one or more of a system memory, a frame buffer, a graphics memory, one or more caches, and the like. In some examples, the graphics processing engine 526 may communicate with one or more of the RTU 518 (e.g., of the computing component 510) and / or the hardware accelerator 519 and / or the ray tracing engine 520.

[0083] In some cases, the ray tracing system 500 (e.g., using the ray tracing engine 520, the acceleration data structure engine 522, the node acquisition and cache engine 524, and / or the graphics processing engine 526) may obtain an acceleration data structure including one or more primitives of the scene object. For example, the ray tracing system 500 may obtain the acceleration data structure from the storage device 502 and / or the memory 516. In some cases, the acceleration data structure engine 522 may be used to generate or construct the acceleration data structure.

[0084] The acceleration data structure engine 522 may obtain one or more representations of scene objects or other scene geometry and generate and / or update a BVH or other acceleration data structure that includes the scene objects or scene geometry. In some examples, the acceleration data structure engine 522 may obtain the representations of the scene objects or other scene geometry at least in part from one or more of the storage device 502 and the memory 516. In some cases, the acceleration data structure engine 522 may obtain the representations of the scene objects or other scene geometry from the ray tracing engine 520 (and / or one or more of the computing components 510).

[0085] The acceleration data structure engine 522 can operate on representations of scene objects and scene geometry using both object space representations and world space representations. In some examples, the acceleration data structure engine 522 can use one or more object-to-world matrices and / or world-to-object matrices to transform scene objects / geometry from object space representation to world space representation and from world space representation to object space representation, respectively.

[0086] As previously mentioned, the systems and techniques can be used to provide accelerated ray tracing operations for one or more types of rays. For example, the systems and techniques can provide accelerated primary ray tracing operations, accelerated shadow ray tracing operations, accelerated reflection ray tracing operations, and / or accelerated refraction ray tracing operations. In one illustrative example, primary ray tracing operations (e.g., primary ray BVH traversals) can be accelerated based on prioritizing (e.g., during traversals) accesses to BVH nodes that are closest to a virtual camera viewpoint. In another illustrative example, shadow ray tracing operations (e.g., shadow ray BVH traversals) can be accelerated based on prioritizing (e.g., during traversals) accesses to BVH nodes that are associated with providing a greater (or maximum) probability of an opaque primitive hit or intersection.

[0087] For example, Fig. 6A An example BVH 600a that can be traversed to perform shadow ray intersection tests is depicted. As shown, BVH 600a includes a root node 602, an internal node 612, and leaf nodes 614, 622, and 624, but other BVHs and / or other hierarchical tree-based acceleration data structures may also be utilized. For example, BVH 600a may include a greater or lesser number of internal nodes 612 and / or may include a greater or lesser number of leaf nodes 614, 622, 624. BVH leaf nodes 614, 622, and 624 are depicted as each including two triangles (e.g., scene geometry or scene primitives). In some cases, one or more of BVH leaf nodes 614, 622, 624 may additionally or alternatively include a greater or lesser number of primitives or other scene geometry. BVH leaf nodes 614, 622, 624 may each include the same number and / or type of primitives. In some examples, the BVH leaf nodes 614 , 622 , 624 may include different numbers and / or types of primitives.

[0088] As previously mentioned, shadow ray intersection testing may be performed based on previously determined intersections (e.g., hit points) between primary rays and scene primitives. In some aspects, shadow ray intersection testing may be performed based on traversing a BVH (e.g., such as BVH 600a) to determine intersections in the 3D scene associated with cast shadow rays. For example, shadow ray intersection testing may be performed based on generating and casting shadow rays from hit points to light sources in the scene, and determining whether the shadow rays intersect with or reach opaque scene primitives. Based on a determination that the cast shadow ray reaches the light source, the hit point (e.g., a scene primitive that was previously intersected by the primary ray and used as an origin for casting the shadow ray) may be identified as being directly illuminated by the light source. Based on a determination that the shadow ray does not reach the light source, the hit point may be identified as being obscured or occluded relative to the light source.

[0089] As previously described, shadow ray intersection testing may be different from principal ray intersection testing based on terminating shadow ray intersection once the shadow ray intersects a light source or intersects an opaque scene primitive (e.g., also referred to as "early shadow ray termination" as previously described). In some aspects, the shadow ray intersection testing may additionally or alternatively be different from one or more of the refraction ray intersection testing and / or the reflection ray intersection testing. When the shadow ray intersection testing is exited via early termination, the path of the shadow ray is not projected beyond the intersection between the shadow ray and the opaque primitive. For example, if the path of the shadow ray intersects at least one opaque scene primitive, the shadow ray may not reach the light source toward which it is projected (e.g., a scene may include multiple primitives in the path of the projected shadow ray, and it may not be necessary to determine whether there is more than one shadow ray-primitive intersection).

[0090] In some cases, shadow ray intersection testing may ignore or invalidate any intersections between shadow rays and non-opaque (e.g., transparent) primitives because transparent primitives may not occlude or shadow the hit point from which the shadow ray is cast. For example, when non-opaque primitives are considered invalid shadow ray intersections, shadow ray intersection testing may terminate once the shadow ray intersects a light source or intersects any opaque scene primitive.

[0091] Shadow ray intersection testing can be performed based on traversing a BVH (e.g., such as BVH 600a). A BVH traversal associated with shadow ray intersection testing can also be referred to as a "shadow ray BVH traversal" or a "shadow ray traversal." In some examples, the same BVH 600a can be utilized (e.g., traversed) to perform primary ray intersection testing and to perform shadow ray intersection testing (and / or to perform reflection ray intersection testing and / or refracted ray intersection testing).

[0092] In some cases, the same traversal technique can be used to perform shadow ray BVH traversals and primary ray BVH traversals. In some examples, the same traversal technique can be used for all ray BVH traversal types (e.g., shadow ray BVH traversals, primary ray BVH traversals, reflected ray BVH traversals, refracted ray BVH traversals). For example, a depth-first search (DFS) BVH traversal can be used to determine intersections or hits associated with primary rays, associated with shadow rays, associated with reflected rays, and associated with refracted rays.

[0093] In one illustrative example, a DFS BVH traversal may be implemented as a traversal in which nodes and / or primitives (e.g., included in a BVH) are traversed starting from a BVH root node (e.g., such as root node 602) and continuing deeper down the hierarchy of the BVH until a BVH leaf node is reached. For example, a DFS BVH traversal of BVH 600a may be performed by traversing from root node 602 to intermediate node 612 to leaf node 622. When the traversal reaches a leaf node (e.g., such as leaf node 622), intersections with a given ray tested during the traversal may be traversed, checked, or otherwise tested. For example, from leaf node 622, the traversal may be performed by testing triangle 652 and triangle 654 (also referred to as non-opaque or transparent primitives 652, 654). If none of the triangles or other primitives associated with the leaf node result in a hit (e.g., intersecting the ray being tested), the DFS traversal may be performed by returning to the lowest level node that has been traversed but still has one or more child nodes that have not yet been traversed. For example, the DFS traversal may be performed by returning to an internal node 612 that has been previously traversed (e.g., from an internal node 612 to a leaf node 624) but has not yet been fully traversed because one of its child nodes (the leaf node 622) has not yet been traversed. Therefore, after returning to the internal node 612, the DFS traversal may proceed to the leaf node 624. From the leaf node 624, the DFS traversal may traverse, check, or otherwise test the primitives included in or associated with the leaf node 624 for intersection with the ray being tested. As shown, the DFS traversal may perform an intersection test on a triangle 655 (also referred to as an opaque primitive 655). In response to determining an intersection or hit between the ray being tested and triangle 655 , the BVH traversal of the ray being tested may be exited (eg, exited with a determined intersection / hit between the ray being tested and triangle 655 ).

[0094] In some aspects, a conventional DFS traversal may be performed without regard to the type of ray being tested and / or the conditions that would cause a DFS traversal of the BVH to successfully exit. In some cases, traversing the BVH in DFS order may be inefficient or non-optimal based on performing intersection tests with one or more primitives that do not return a hit. Performing intersection tests with primitives that do not return a hit may be considered a wasteful or inefficient use of computation cycles. For example, in the above example of traversing BVH 600a in DFS order, triangles 652 and 654 are traversed and tested for intersection, but do not result in a hit. An optimal traversal of BVH 600a in DFS order may be provided by sorting the nodes and / or primitives included in BVH 600a so that triangle 655 (e.g., which does result in a hit / intersection with the ray being tested) is traversed first or is otherwise more likely to be traversed first.

[0095] For example, an optimal BVH traversal technique for a primary ray intersection test may be to traverse the BVH nodes in order of their distance from an imaginary camera viewpoint, such that the BVH nodes closest to the imaginary camera viewpoint are traversed first. However, a BVH traversal technique that is optimal for one type of ray intersection test may not be optimal (or may be less optimal) for a different type of ray intersection test.

[0096] For example, when a BVH is traversed for a primary ray intersection test, the traversal may exit when an intersection between the primary ray and any primitive (e.g., opaque or non-opaque) is determined. When a BVH is traversed for a shadow ray intersection test, if an intersection between a shadow ray and a non-opaque primitive is determined, the traversal may not exit, but rather continue until an intersection is found between the shadow ray and an opaque primitive (or a light source in the scene). In some cases, performing shadow ray traversals based on primary ray traversal techniques may be inefficient. When a BVH includes opaque and non-opaque primitives, intersection tests performed between shadow rays and any non-opaque primitives traversed may result in wasted clock cycles (e.g., because even if an intersection is found for a shadow ray and a non-opaque primitive, the intersection will be ignored or invalidated, and the shadow ray BVH traversal continues).

[0097] For example, BVH 600a may include a combination of non-opaque (e.g., transparent) primitives 652, 654, and 656 and opaque primitives 655, 657, and 659. As shown, non-opaque primitives 652, 654, 656 are unshaded, while opaque primitives 655, 657, 659 are shaded. BVH nodes that include only non-opaque primitives are unshaded (e.g., BVH node 622). BVH nodes that include only opaque primitives are shaded (e.g., BVH node 614). BVH nodes that include both opaque and non-opaque primitives are partially shaded (e.g., BVH nodes 602, 612, and 624).

[0098] Fig. 6A The bold connection arrows included in illustrate an example of a shadow ray traversal technique with wasted clock cycles (eg, from accessing non-opaque primitives). Fig. 6A The example shadow ray traversal technique illustrated in can be the same or similar to a primary ray BVH traversal technique such as the depth-first traversal technique described above, where primitives closest to the virtual camera viewpoint are traversed first. In some aspects, the shadow ray traversal can be performed independently of the contents of each BVH node. Fig. 6A (e.g., regardless of whether the BVH node contains only opaque primitives, only non-opaque primitives, or a combination of both).

[0099] For example, starting from BVH root node 602, shadow ray traversal may proceed to BVH interior node 612, which includes BVH leaf nodes 622 and 624. The traversal then continues from BVH interior node 612 to BVH leaf node 622, which includes non-opaque primitives 652 and 654 as its children.

[0100] The traversal may first visit the non-opaque primitives 652. Although any intersection determined between the shadow ray and the non-opaque primitives 652 may be ignored or invalid (e.g., because the non-opaque primitives 652 are transparent), the shadow ray traversal may perform an intersection test between the shadow ray and the non-opaque primitives 652. For example, the intersection test may be performed based on calling an arbitrary hit shader and providing the shadow ray and the non-opaque primitives 652 as inputs. The arbitrary hit shader consumes one or more clock cycles to determine the intersection result. If the arbitrary hit shader determines that the shadow ray and the non-opaque primitives 652 do not intersect, the shadow ray traversal continues. If the arbitrary hit shader determines that the shadow ray does intersect the non-opaque primitives 652, the shadow ray traversal may also continue (e.g., because the intersection between the shadow ray and the non-opaque primitives is ignored or considered invalid).

[0101] In this example, shadow ray traversal is paused while the any-hit shader is called to determine the intersection result between the shadow ray and the non-opaque primitive 652, but then continues to traverse the BVH 600a regardless of the result determined by the any-hit shader (e.g., wasting one or more clock cycles consumed by the any-hit shader call). Regardless of the result determined by the any-hit shader, shadow ray traversal of the BVH 600a is then performed by visiting the non-opaque primitive 654 (e.g., the remaining child nodes of the BVH leaf node 622).

[0102] The any-hit shader is called again and consumes one or more clock cycles to determine the intersection result 654 between the shadow ray and the non-opaque primitive. As described above with respect to the non-opaque primitive 652, the shadow ray traversal of the BVH 600a can then proceed to visit the next BVH node regardless of the intersection result determined by the any-hit shader call to the shadow ray and the non-opaque primitive 654.

[0103] For example, after calling the any-hit shader to perform intersection tests on non-opaque primitives 652 and 654, the shadow ray traversal of BVH 600a may return to BVH node 612 and continue to BVH leaf node 624. BVH leaf node 624 includes opaque primitive 655 and non-opaque primitive 656. Opaque primitive 655 may be visited first, and the any-hit shader may be called to determine the result of the intersection test between the shadow ray and the opaque primitive 655. If the any-hit shader determines that the shadow ray intersects the opaque primitive 655, the shadow ray traversal of BVH 600a may be terminated (e.g., early termination based on the shadow ray, as described above).

[0104] exist Fig. 6A In the example shadow ray traversal of the BVH 600a illustrated in , the any-hit shader is called three times before the shadow ray early termination condition is triggered. The any-hit shader is called twice to determine intersection results that may be ignored or invalid (e.g., intersection results between shadow rays and non-opaque primitives 652, 654), which may result in wasted clock cycles and / or extended shadow ray BVH traversal time. Wasted clock cycles and extended shadow ray BVH traversal times may reduce the efficiency of ray tracing operations for shadow rays. For example, shadow rays that intersect or hit non-opaque (e.g., transparent) primitives may be associated with a polynomial degradation in performance.

[0105] What is needed are systems and techniques for accelerating BVH traversal based on the type of rays being tested (and / or based on the type of ray intersection tests being performed) that minimize intersection tests against primitives that are less likely to result in intersection results that trigger a traversal exit (e.g., less likely to provide a hit or intersection).

[0106] The systems and techniques described herein may be used to perform primary ray BVH traversals, shadow ray BVH traversals, reflection ray BVH traversals, and / or refracted ray BVH traversals with improved efficiency. For example, the systems and techniques may utilize one or more information values ​​obtained for each primitive included in a given BVH to compute sorting parameter values ​​for some (or all) BVH nodes. Based on the corresponding sorting parameter values ​​determined for the BVH nodes, the systems and techniques may perform an accelerated traversal of the BVH by using a sorting order determined based on the sorting parameter values. In an illustrative example, the systems and techniques may use the sorting parameter values ​​to perform a BVH traversal that prioritizes access to BVH nodes that are more likely to provide ray intersection results (e.g., more likely to provide ray intersection results more quickly).

[0107] As previously mentioned, information values ​​may be obtained for each primitive (and / or procedural primitive) included in the BVH. In some aspects, the information values ​​may be obtained using an application programming interface (API) associated with a BVH traversal operation. For example, an API associated with Figure 5 The information value is obtained by a ray tracing API associated with or included in one or more of the ray tracing engine 520 and / or the acceleration data structure engine 522 illustrated in the ray tracing system 500.

[0108] The information value may indicate one or more properties or measurements associated with the primitive. For example, the information value may indicate a surface area heuristic (SAH) value, the opacity of the primitive, the area of ​​the primitive, the density of the primitive, the distance of the primitive from the virtual camera viewpoint, the material information of the primitive, the level of detail (LOD) of the primitive, the complexity, etc. In some examples, the information value may additionally or alternatively indicate the complexity of one or more procedural primitives. In such examples, the information value indicating the complexity of the procedural primitive may be used to speed up traversal by traversing paths associated with less complex geometry (e.g., paths with the least complex geometry) (e.g., through nodes of a given BVH) before traversing any other paths.

[0109] In some aspects, at least one information value may be provided for each primitive included in a given hierarchical acceleration data structure (e.g., BVH). In some examples, the same number of information values ​​may be provided per primitive (e.g., one information value per primitive, two information values ​​per primitive, etc.). Additionally or alternatively, the same type of information value may be provided per primitive. For example, each primitive may be associated with an information value indicating an opacity of the corresponding primitive, or each primitive may be associated with an information value indicating a distance of the corresponding primitive from a virtual camera viewpoint, etc.

[0110] For example, Figure 6B An example BVH 600b is depicted, where information values ​​are obtained for each of the primitives included in the BVH 600b and used to perform accelerated BVH traversal operations. In one illustrative example, information values ​​are obtained for each of the triangles 652, 654, 655, 656, 657, and 659 included in the BVH 600b. The information values ​​may be numerical values ​​and are depicted in parentheses under the corresponding triangles 652 to 659 (e.g., "(0)" or "(1)"). In some aspects, the information values ​​may be numerical values ​​normalized within a given range of values. For example, the information values ​​may be numerical values ​​normalized to the range [0, 1], such as the distance of the primitive from the virtual camera viewpoint. In some cases, the information values ​​may be unnormalized numerical values ​​or measurements (e.g., an information value representing a measured quantity, attribute, or characteristic of a given primitive may be the same as an actual measured value of the quantity, attribute, or characteristic of the given primitive).

[0111] In some examples, one or more (or all) of the information values ​​obtained for each of the plurality of primitives included in the BVH may be obtained from a ray tracing API. For example, the information values ​​may be included in a render list used to construct the BVH and / or render a scene by performing ray tracing operations using the BVH. In some examples, the render list may include tabular data associated with the plurality of primitives (e.g., each primitive is represented by one or more rows of the tabular data, and the attributes or other information associated with the primitives are represented by one or more columns of the tabular data). In some examples, the information values ​​used by the systems and techniques described herein to perform accelerated BVH traversals may be obtained as entries in one or more columns of a render list associated with the plurality of primitives included in the BVH. In some aspects, the systems and techniques may obtain the information values ​​of the plurality of primitives from an ISV (independent software vendor) and / or an IHV (independent hardware vendor), wherein the ISV or IHV implements a software ray tracing renderer and a hardware ray tracing renderer, respectively. For example, an ISV and / or IHV ray tracing rendering can utilize a ray tracing API to communicate with the systems and techniques described herein and provide information values ​​for primitives included in the BVH (e.g., using render lists as described above or various other API-based communications and messages). In some aspects, based on the use of a predetermined accelerated BVH traversal technique (e.g., a DSF traversal) and / or the use of a predetermined technique for calculating a corresponding sorting parameter value for each BVH node and then sorting the BVH nodes using the corresponding sorting parameter value, the information values ​​for the plurality of primitives can be selectively provided such that the BVH traversal is accelerated, as will be described in more depth below.

[0112] For example, Figure 6B The BVH 600b depicted in FIG. Fig. 6A 600a, and described above with respect to conventional DSF traversals for shadow ray intersection testing. Continuing in the example of performing a DSF traversal for shadow ray intersection testing, BVH 600a and / or BVH 600b may be traversed optimally or more efficiently if opaque nodes are tested first (e.g., because even if an intersection between a shadow ray and a non-opaque primitive is determined, shadow ray traversal will continue until an intersection between a shadow ray and an opaque primitive is determined). In one illustrative example, an optimal shadow ray traversal of BVH 600a and / or 600b may include a traversal from BVH root node 602 to BVH interior node 614 to one of opaque triangles 657 or 659. However, when a DSF traversal is performed on BVH 600b, the optimal traversal route will not be the first traversal route (e.g., the first traversal route when a DSF traversal is performed on BVH 600b may be the same as Fig. 6A The bold traversal routes are the same as those described above).

[0113] In one illustrative example, the system and technique can be used to accelerate BVH traversal without modifying the BVH traversal technique. For example, the BVH traversal can be accelerated while still using conventional DSF traversal techniques. The BVH traversal can be accelerated based on classification parameter values ​​associated with each BVH node (e.g., nodes 602, 612, 614, 622, and 624), where the classification parameter values ​​are calculated based on information values ​​assigned to each of the plurality of primitives 652, 654, 655, 656, 657, and 659.

[0114] For example, to speed up shadow ray BVH traversal, information values ​​may be assigned to a plurality of primitives 652 to 659 based on whether each primitive (e.g., triangle) is opaque or non-opaque. As shown, non-opaque triangles 652, 654, and 656 may each be assigned an information value of 1, and opaque triangles 655, 657, and 659 may each be assigned an information value of 0. In some aspects, a greater granularity may be utilized in assigning information values. For example, instead of a binary scheme in which primitives are assigned a value of 0 or 1, the information value may be a decimal number indicating a degree of opacity associated with each primitive, or other measurement of opacity, etc.

[0115] In some aspects, the information values ​​obtained for the primitives of BVH 600b may be propagated upward along the hierarchical tree structure of BVH 600b and used to determine a corresponding sorting parameter value for each of a plurality of nodes included in BVH 600b. Shadow ray traversal of BVH 600b may be accelerated by sorting the nodes included in BVH 600b based on their corresponding sorting parameter values, such that nodes with a greater probability of providing shadow ray opaque primitive intersections are first traversed in a DFS traversal. In some examples, when non-opaque primitives are assigned an information value of 1 and opaque primitives are assigned an information value of 0, shadow ray traversal of BVH 600b may be accelerated by sorting the nodes included in BVH 600b such that a DFS traversal will first visit BVH nodes with the lowest sorting parameter values. Because the sorting parameter values ​​are calculated based on the information values ​​of the triangles, the BVH node with the greatest probability of shadow ray opaque primitive intersection may be the BVH node with the lowest sorting parameter value (eg, because a value of 0 is associated with opaque primitives).

[0116] In an illustrative example, a sorting parameter value of a given BVH node may be determined using a function calculation that takes the sorting parameter value associated with the child nodes of a given BVH node as input. The child nodes of a given BVH node may include one or more of a BVH leaf node, a BVH internal node, and / or a primitive. For example, the child nodes of a given BVH node may be included in a subtree of the given BVH node (e.g., where the given BVH node is the root node of its subtree) and / or included in the top layer of the subtree of the given BVH node. When a given BVH node is a leaf node, the same function calculation may be performed, instead of taking the information value associated with the primitive included in the given BVH leaf node or the given BVH leaf node as input. For example, the function calculation may be to determine a mean or average value, although various other function calculations may also be utilized, including but not limited to determining a median, a mode, a windowed average, a minimum, a maximum, etc. In some aspects, the function calculation may be specified as an input to the systems and techniques described herein. For example, an identifier calculated by a function utilized in generating ordering parameter values ​​for multiple BVH nodes included in a given BVH may be provided as input using a ray tracing API (e.g., which may be the same ray tracing API used to specify information values ​​for primitives included in a given BVH).

[0117] As previously mentioned, the information values ​​obtained for the primitives of BVH 600b may be propagated upward along the hierarchical tree structure of BVH 600b and used to determine a corresponding sorting parameter value for each of a plurality of nodes included in BVH 600b. For example, starting from the leaf nodes (e.g., leaf nodes 622, 624, and 614) of BVH 600b, the corresponding sorting parameter value for each BVH leaf node may be determined using information values ​​associated with triangles or other primitives included in each BVH leaf node.

[0118] For example, when the function calculation used to determine the sort parameter value is an average operation, the sort parameter value determined for BVH leaf node 622 may be the average of the information values ​​associated with triangles 652 and 654. As shown, triangles 652 and 654 are each non-opaque triangles and are assigned an information value of 1. Therefore, the sort parameter value determined for BVH leaf node 622 is 1.

[0119] The sorting parameter value for BVH leaf node 624 may be determined as the average of the information values ​​associated with triangles 655 and 656. As shown, triangle 655 is an opaque triangle assigned an information value of 0, and triangle 656 is a non-opaque triangle assigned an information value of 1. Therefore, the sorting parameter value determined for BVH leaf node 624 is 0.5.

[0120] The sorting parameter value for BVH leaf node 614 may be determined as the average of the information values ​​associated with triangles 657 and 659 , both of which are opaque triangles and are both assigned an information value of 0. Thus, the sorting parameter value determined for BVH leaf node 614 is 0.

[0121] The sorting parameter values ​​associated with the BVH internal nodes and / or the BVH root nodes may be determined by applying the same function calculation (e.g., averaging) to the sorting parameter values ​​of the child nodes associated with each BVH internal node or the root node. In some examples, the sorting parameter values ​​associated with the BVH internal nodes and / or the BVH root nodes may be determined by applying the same function calculation (e.g., averaging) to the sorting parameter values ​​determined based on one or more information values ​​associated with the corresponding one or more primitives included in the subtree of the node. For example, the child nodes of the BVH internal node 612 are the BVH leaf node 622 (e.g., associated with a sorting parameter value of 1) and the BVH leaf node 624 (e.g., associated with a sorting parameter value of 0.5). Based on averaging the sorting parameter values ​​of its two child nodes, the sorting parameter value of the BVH leaf node 612 may be determined to be 0.75.

[0122] Similarly, the children of BVH root node 602 are BVH internal node 612 (e.g., associated with a sort parameter value of 0.75) and BVH leaf node 614 (e.g., associated with a sort parameter value of 0). Based on averaging the sort parameter values ​​of its two children, the sort parameter value of BVH root node 602 may be determined to be 0.575.

[0123] Accelerated BVH traversal for a given type of ray (e.g., primary ray, shadow ray, reflection ray, refraction ray) may be performed using a sorting parameter value determined for each node included in the BVH, wherein the sorting parameter value indicates a relative probability that visiting or traversing a given BVH node will result in an intersection or hit result that causes the BVH traversal to successfully exit.

[0124] For example, a shadow ray BVH traversal may be performed by selecting (e.g., visiting) at each level of the BVH a BVH node associated with an increasing probability of the shadow ray intersecting an opaque primitive. In some aspects, the BVH may be traversed in a depth-first search (DFS), where a selection decision (e.g., between multiple BVH nodes that may be traversed or visited next) is based on the probability of a shadow ray intersecting an opaque primitive included in a given BVH node.

[0125] The probability that a shadow ray intersects an opaque primitive may be indicated by or otherwise determined based on a sorting parameter value associated with a given BVH node. Figure 6BIn the example of , a BVH node having a lower sorting parameter value compared to another BVH node at the same level of the BVH may be associated with a greater probability that a shadow ray intersects an opaque primitive (e.g., because based on opaque primitives being assigned information values ​​of 0 and non-opaque primitives being assigned information values ​​of 1, the BVH node having the lower sorting parameter value includes a larger percentage of opaque primitives than the BVH node having the higher sorting parameter value).

[0126] In one illustrative example, the BVH nodes of a given BVH level (e.g., nodes 622 and 624 are included in the first level of BVH 600b, nodes 612 and 614 are included in the second level of BVH 600b, and node 602 is included in the third level of BVH 600b) may be sorted in increasing or decreasing order based on the sorting parameter value of each node. For example, the BVH nodes of each level of BVH 600b may be sorted in increasing order (e.g., from left to right) when lower information values ​​are assigned to primitives that produce desired results (e.g., intersections or hits that allow a BVH traversal to exit successfully; such as assigning an information value of 0 to opaque primitives in a shadow ray BVH traversal). When higher information values ​​are assigned to primitives that produce desired results. As a result, the BVH nodes of each level of BVH 600b may be sorted in decreasing order (e.g., from left to right). Based on the sorted order of the BVH nodes at each level of BVH 600b, a DFS traversal of BVH 600b after sorting (e.g., when multiple branches are available for the next traversal step, it may always select the leftmost branch for traversal) may automatically visit (e.g., traverse to) the BVH node at each level that is associated with the greatest likelihood of producing the desired result that allows early termination of the traversal process.

[0127] In the example of a shadow ray traversal of BVH 600b, the sorting parameter values ​​determined for each node included in BVH 600b may be used to sort the nodes included in each level of BVH 600b in an increasing order from left to right. Based on this sorting order, the leftmost node at each BVH level will be the node with the lowest sorting parameter value (e.g., and therefore the node with the greatest probability of causing a shadow ray opaque primitive intersection that allows the BVH traversal to exit successfully). In the increasing order sorting based on the respective sorting parameter values ​​determined for each node of a given BVH level, the BVH node with the lowest sorting parameter value is provided first in the sorting order, and the BVH node with the greatest sorting parameter value is provided last in the sorting order.

[0128] For example, at a first (e.g., bottom) BVH level of BVH 600b, leaf node 624 would be provided first in the sorted order, and leaf node 622 would be provided last in the sorted order, based on respective sort parameter values ​​of 0.5 and 1. At a second (e.g., middle) BVH level of BVH 600b, leaf node 614 would be provided first in the sorted order, and internal node 612 would be provided last in the sorted order, based on respective sort parameter values ​​of 0 and 0.75.

[0129] based on Figure 6B For the sorting parameter value for each node included in BVH 600b as depicted in , an accelerated shadow ray BVH traversal can be performed that starts at root node 602 and first traverses to BVH leaf node 614 (e.g., which has a sorting parameter value of 0 and contains only opaque primitives) rather than first traversing to BVH interior node 612 (e.g., which has a sorting parameter value of 0.75 and contains two BVH leaf nodes and four primitives, only one of which is opaque). The shadow ray BVH traversal can then successfully exit in the next traversal step when accessing opaque primitive 657 or opaque primitive 659. In some aspects, relative to the description of Fig. 6A The shadow ray traversal described with respect to BVH 600a is accelerated because the DFS traversal of the sorted BVH 600b (e.g., based on systems and techniques using a determined sort value parameter and / or sort order of BVH nodes at each BVH level) is successfully completed in two steps (e.g., node 602 to node 614 to opaque primitive 657), while the DFS traversal of the unsorted BVH 600a / 600b is successfully completed in a significantly greater number of steps (e.g., 602-612-622-652-622-654-622-612-624-655).

[0130] In an illustrative example, the above-described method for determining corresponding sorting parameter values ​​for each BVH node included in a given BVH and subsequently accelerating shadow ray traversal based on the sorted order may also be used to accelerate one or more additional ray type BVH traversals, where the sorted order prioritizes DFS traversal of nodes at each BVH level having the greatest probability of intersecting with opaque primitives.

[0131] For example, a ray (e.g., such as a primary ray) may only need to return a first intersection result, rather than a closed intersection result. In such a scenario, the traversal logic for the primary ray may be the same as the traversal logic for the shadow ray. In some examples, RAY_FLAG_ACCEPT_FIRST_HIT_AND_END_SEARCH may be set and used to indicate that the BVH traversal for this ray may be accelerated using the techniques described above for the shadow ray BVH traversal.

[0132] In some examples, the systems and techniques can obtain information values ​​for each primitive included in a given hierarchical acceleration data structure (e.g., BVH), and can use the information to generate a new or updated hierarchical acceleration data structure (e.g., BVH) that has been sorted using subsequently determined sorting parameter values ​​and / or sorting orders at each node. For example, the updated hierarchical acceleration data structure 700 may be updated in the following manner: Figure 7 , and may be generated based on applying an increasing sort order of sort parameter values ​​at each BVH level of BVH 600b.

[0133] In one illustrative example, when an updated hierarchical acceleration data structure or BVH (e.g., updated hierarchical acceleration data structure 700) is generated by using the sorting order and / or the determined sorting parameter value for each BVH node and each BVH level of an existing BVH (e.g., BVH 600b), the updated hierarchical acceleration data structure may be generated without storing the sorting parameter value at each BVH node or the information value at each primitive included in the BVH. For example, because the updated BVH (e.g., updated hierarchical acceleration data structure 700) is generated (e.g., sorted into the sorting order) so that the first node is visited at a given BVH level when a predetermined traversal strategy (e.g., DFS traversal) is applied, traversal of the updated hierarchical BVH may be accelerated without referring to the sorting parameter value associated with each BVH node.

[0134] Figure 8 800 for graphics processing. Although the example process 800 depicts a particular order of operations, the order may be altered without departing from the scope of the present disclosure. For example, some of the depicted operations may be performed in parallel or in a different order that does not materially affect the functionality of the process 800. In other examples, different components of an example device or system implementing the process 800 may perform functions substantially simultaneously or in a particular order.

[0135] At block 802, process 800 includes obtaining a hierarchical acceleration data structure that includes a plurality of primitives of a scene object. For example, the plurality of primitives may include a plurality of triangles, axis-aligned bounding boxes (AABBs), and / or other scene geometry and / or scene primitives. In some examples, the plurality of primitives may be similar to FIG. 2A to FIG. 2B In some cases, the hierarchical acceleration data structure may be composed of Figure 5 The acceleration data structure may be obtained by or from an acceleration data structure engine 522 associated with the ray tracing system 500 illustrated in FIG. 5 . In some cases, the hierarchical acceleration data structure may include a bounding volume hierarchy (BVH).

[0136] In some examples, the hierarchical acceleration data structure may be Figure 2B 252a to 252e. In some cases, the hierarchical acceleration data structure may include TLAS and BLAS, such as Figure 4A In some examples, the hierarchical acceleration data structure may be the same as the TLAS 410 and BLAS 430 illustrated in FIG. Figure 4B BVH 400b, Fig. 6A BVH 600a exemplified in Figure 6B BVH 600b, Figure 7 A BVH that is the same as or similar to the BVH 700 illustrated in FIG.

[0137] At block 804, process 800 includes obtaining a corresponding information value associated with each primitive included in the plurality of primitives. For example, each corresponding information value associated with each primitive may include at least one of a surface area heuristic (SAH) value, an opacity value, or a density value. In some cases, each corresponding information value associated with each primitive may include at least one of an area value, a distance value between each corresponding primitive and a camera associated with the scene object, or a level of detail (LOD) value. In some examples, each primitive included in the plurality of primitives may be associated with the same type of information value. In some cases, each primitive may be associated with the same number and / or type of information value.

[0138] In some examples, each corresponding information value associated with each primitive is included as an entry in a render list associated with the scene object. For example, the corresponding information value associated with each primitive can be obtained as input to a ray tracing application programming interface (API). In some examples, Figure 5The ray tracing system 500 illustrated in FIG. 5 may include a ray tracing API. For example, the ray tracing API may be included in one or more of a ray tracing engine 520, an acceleration data structure engine 522, a node acquisition and cache engine 524, and the like.

[0139] In some examples, the information value may include an opacity value, wherein at least a first value of the opacity value indicates an opaque primitive, and at least a second value of the opacity value indicates a non-opaque primitive. For example, a value of "0" may be assigned to an opaque primitive, and a value of "1" may be assigned to a non-opaque primitive.

[0140] At block 806, process 800 includes determining a sort order of the two or more nodes included in the same level of the hierarchical acceleration data structure at least in part by sorting the two or more nodes included in the same level of the hierarchical acceleration data structure based on respective sort parameter values ​​determined for each respective node of the two or more nodes, wherein each respective sort parameter value is based on at least one information value associated with one or more primitives included in a subtree of each respective node of the two or more nodes. For example, the sort order may be based on a descending order of each respective sort parameter value associated with each respective node of the two or more nodes.

[0141] In some examples, each respective sorting parameter value determined for each respective node of the two or more nodes may include a calculated value based on sorting parameter values ​​determined for one or more child nodes associated with each respective node. For example, the calculated value may be an average of the respective sorting parameter values ​​determined for the one or more child nodes. In some cases, the calculated value may be determined based on a function calculation specified as an input to a ray tracing API.

[0142] In some cases, a corresponding sort parameter value may be determined for each corresponding node of one or more nodes included in a first level of the hierarchical acceleration data structure. Based on the corresponding sort parameter value determined for each corresponding node of the one or more nodes included in the first level, a corresponding sort parameter value may be determined for each corresponding node of one or more nodes included in a second level of the hierarchical acceleration data structure. For example, one or more nodes included in the first level may be child nodes of one or more nodes included in the second level (e.g., they are parent nodes of nodes included in the first level).

[0143] In some cases, one or more nodes included in the first level may be leaf nodes of the hierarchical acceleration data structure, wherein each respective leaf node is associated with one or more primitives of the plurality of primitives. In some cases, the respective sorting parameter value determined for each respective leaf node may include a calculated value based on at least one information value determined for the one or more primitives associated with each respective leaf node.

[0144] At block 808, process 800 includes traversing the hierarchical acceleration data structure using the sort order. In some examples, the sort order is based on a descending order of each respective sort parameter value associated with each respective node in the two or more nodes. In some cases, the sort order may be based on an ascending order of the respective sort parameter values.

[0145] In some examples, the sort order may be used to perform a depth first search (DFS) traversal of the hierarchical acceleration data structure. The sort order may be determined based on at least one information value associated with each primitive in the plurality of primitives and at least one sort parameter value associated with each node in the plurality of nodes included in the hierarchical acceleration data structure.

[0146] In some cases, traversing the hierarchical acceleration data structure may include traversing from a parent node to a selected child node associated with the parent node, wherein the selected child node is selected based on a sorting parameter value associated with the selected child node. For example, the selected child node may be selected from one or more child nodes associated with the parent node, and wherein the selected child node is associated with a maximum sorting parameter value or a minimum sorting parameter value of the one or more child nodes.

[0147] In some examples, traversing the hierarchical acceleration data structure includes: generating an updated hierarchical acceleration data structure based on the sorted order, wherein the multiple primitives included in the updated hierarchical acceleration data structure are the same as the multiple primitives included in the hierarchical acceleration data structure. In some cases, the updated hierarchical acceleration data structure includes multiple nodes, and each corresponding node in the multiple nodes is included in a corresponding level in the multiple levels included in the hierarchical acceleration data structure. The updated hierarchical acceleration data structure can be generated based on sorting one or more nodes included in each corresponding level in the multiple levels, so that a depth-first search (DFS) traversal of the updated hierarchical acceleration data structure traverses the multiple nodes in the sorted order.

[0148] In some examples, ray traced graphics content may be generated based on traversing the hierarchical acceleration data structure using the sorted order.

[0149] In some examples, the processes described herein (e.g., process 800 and / or any other process described herein) can be performed by a computing device, apparatus, or system. In one example, process 800 can be performed by a computer having Fig. 9The computing device, apparatus or system may be executed by a computing device or system of the computing device architecture 900 of the present invention. The computing device, apparatus or system may include any suitable device, such as a mobile device (e.g., a mobile phone), a desktop computing device, a tablet computing device, a wearable device (e.g., a VR headset, an AR headset, AR glasses, an extended reality (XR) headset, a networked watch or smart watch, or other wearable device), a server computer, a vehicle or a computing device of a vehicle, a robotic device, a laptop computer, a smart TV, a camera and / or any other computing device having resource capabilities to perform the processes described herein (including process 800 and / or other processes described herein). In some cases, the computing device or apparatus may include various components, such as one or more input devices, one or more output devices, one or more processors, one or more microprocessors, one or more microcomputers, one or more cameras, one or more sensors and / or other components configured to perform the steps of the processes described herein. In some examples, the computing device may include a display, a network interface configured to communicate and / or receive data, any combination thereof and / or other components. The network interface may be configured to communicate and / or receive data based on an Internet Protocol (IP) or other types of data.

[0150] The components of the computing device may be implemented in circuits. For example, the components may include and / or may be implemented using electronic circuits or other electronic hardware, which may include one or more programmable electronic circuits (e.g., microprocessors, graphics processing units (GPUs), digital signal processors (DSPs), central processing units (CPUs), and / or other suitable electronic circuits), and / or may include and / or may be implemented using computer software, firmware, or any combination thereof for performing the various operations described herein.

[0151] Process 800 is illustrated as a logic flow diagram, the operations of which represent a sequence of operations that can be implemented in hardware, computer instructions, or a combination thereof. In the context of computer instructions, each operation represents a computer-executable instruction stored on one or more computer-readable storage media that, when executed by one or more processors, performs the described operation. Generally speaking, computer-executable instructions include routines, programs, objects, components, data structures, etc. that perform specific functions or implement specific data types. The order in which the operations are described is not intended to be construed as a limitation, and any number of the described operations may be combined in any order and / or in parallel to implement the process.

[0152] Additionally, process 800 and / or any other process described herein may be performed under the control of one or more computer systems configured with executable instructions, and may be implemented as code (e.g., executable instructions, one or more computer programs, or one or more applications) that is executed together on one or more processors, through hardware, or a combination thereof. As noted above, the code may be stored on a computer-readable or machine-readable storage medium, for example, in the form of a computer program that includes a plurality of instructions that can be executed by one or more processors. The computer-readable or machine-readable storage medium may be non-transitory.

[0153] Fig. 9 An example computing device architecture 900 of an example computing device that can implement the various techniques described herein is illustrated. In some examples, the computing device may include a mobile device, a wearable device, an extended reality device (e.g., a virtual reality (VR) device, an augmented reality (AR) device, an extended reality (XR) device, or a mixed reality (MR) device), a personal computer, a laptop computer, a video server, a vehicle (or a computing system or device of a vehicle), or other device. The components of the computing device architecture 900 are shown as using a connector 905 (such as a bus) to electrically communicate with each other. The example computing device architecture 900 includes a processing unit (CPU or processor) 910 and a computing device connector 905, which couples various computing device components including a computing device memory 915 (such as a read-only memory (ROM) 920 and a random access memory (RAM) 925) to the processor 910.

[0154] The computing device architecture 900 may include a cache of high-speed memory directly connected to, in close proximity to, or integrated as part of the processor 910. The computing device architecture 900 may copy data from the memory 915 and / or the storage device 930 to the cache 912 for fast access by the processor 910. In this way, the cache can provide a performance improvement that avoids delays in the processor 910 when waiting for data. These engines and other engines can control or be configured to control the processor 910 to perform various actions. Other computing device memories 915 are also available. The memory 915 may include a variety of different types of memory with different performance characteristics. The processor 910 may include any general-purpose processor and hardware or software services (such as service 1 932, service 2 934, and service 3 936 stored in the storage device 930) configured to control the processor 910, as well as a dedicated processor in which software instructions are incorporated into the processor design. The processor 910 may be a self-contained system, including multiple cores or processors, buses, memory controllers, caches, etc. Multi-core processors may be symmetric or asymmetric.

[0155] To enable user interaction with the computing device architecture 900, the input device 945 may represent any number of input mechanisms, such as a microphone for voice, a touch-sensitive screen for gesture or graphic input, a keyboard, a mouse, motion input, voice, etc. The output device 935 may also be one or more of a plurality of output mechanisms known to those skilled in the art, such as a display, a projector, a television, a speaker device, etc. In some instances, a multi-mode computing device may enable a user to provide multiple types of input to communicate with the computing device architecture 900. The communication interface 940 may generally command and manage user input and computing device output. There is no restriction on operating on any particular hardware arrangement, and thus the underlying features herein may be easily replaced to obtain improved hardware or firmware arrangements as they are developed.

[0156] The storage device 930 is a non-volatile memory and may be a hard disk or other type of computer readable medium that can store computer accessible data, such as a magnetic tape cartridge, a flash memory card, a solid-state memory device, a digital versatile disk, a cassette tape, a random access memory (RAM) 925, a read-only memory (ROM) 920, and hybrids thereof. The storage device 930 may include services 932, 934, 936 for controlling the processor 910. Other hardware or software modules or engines are contemplated. The storage device 930 may be connected to the computing device connection 905. In one aspect, a hardware module that performs a particular function may include a software component stored in a computer readable medium connected to the necessary hardware components (such as the processor 910, the connection 905, the output device 935, etc.) to perform the function.

[0157] Aspects of the present disclosure are applicable to any suitable electronic device (such as a security system, smart phone, tablet computer, laptop computer, vehicle, or other device) that includes or is coupled to one or more active depth sensing systems. Although described below with respect to a device having or being coupled to one light projector, aspects of the present disclosure are applicable to devices having any number of light projectors and are therefore not limited to a particular device.

[0158] The term "device" is not limited to one or a specific number of physical objects (such as a smart phone, a controller, a processing system, etc.). As used herein, a device can be any electronic device having one or more parts that can implement at least some parts of the present disclosure. Although the following description and examples use the term "device" to describe various aspects of the present disclosure, the term "device" is not limited to a specific configuration, type, or number of objects. Additionally, the term "system" is not limited to multiple components or specific aspects. For example, a system can be implemented on one or more printed circuit boards or other substrates and can have movable or static components. Although the following description and examples use the term "system" to describe various aspects of the present disclosure, the term "system" is not limited to a specific configuration, type, or number of objects.

[0159] Specific details are provided in the above description to provide a detailed understanding of the various aspects and examples provided herein. However, it will be understood by those skilled in the art that these aspects can also be practiced without these specific details. For clarity, in some cases, the present technology may be presented as including separate functional blocks, including functional blocks comprising devices, device components, steps or routines in the method embodied in a combination of software or hardware and software. Additional components other than those components shown in the accompanying drawings and / or described herein may be used. For example, circuits, systems, networks, processes and other components may be shown as components in block diagram form to avoid confusing these aspects in unnecessary details. In other examples, known circuits, processes, algorithms, structures and techniques may be shown without unnecessary details to avoid confusing various aspects.

[0160] Various aspects may be described above as a process or method, which is depicted as a flow chart, a flow diagram, a data flow diagram, a structure diagram, or a block diagram. Although a flow chart may describe an operation as a sequential process, many operations in the operation may be performed in parallel or concurrently. In addition, the order of the operations may be rearranged. The process is terminated when the operation of the process is completed, but the process may have additional steps not included in the accompanying drawings. A process may correspond to a method, a function, a procedure, a subroutine, a subprogram, etc. When a process corresponds to a function, the termination of the process may correspond to the function returning to the calling function or the main function.

[0161] The processes and methods according to the above examples can be implemented using stored computer executable instructions or otherwise obtained from a computer readable medium. Such instructions may include, for example, instructions and data that cause or otherwise configure a general purpose computer, a special purpose computer, or a processing device to perform a certain function or group of functions. Portions of the computer resources used may be accessed via a network. Computer executable instructions may be, for example, binary files, intermediate format instructions (such as assembly language), firmware, source code, etc.

[0162] The term "computer-readable medium" includes, but is not limited to, portable or non-portable storage devices, optical storage devices, and various other media capable of storing, containing or carrying instructions and / or data. Computer-readable media may include non-transient media in which data may be stored and does not include carrier waves and / or transient electronic signals that are propagated wirelessly or on a wired connection. Examples of non-transient media may include, but are not limited to, disks or tapes, optical storage media (such as flash memory), memory or memory devices, disks or optical disks, flash memory, USB devices provided with non-volatile memory, network storage devices, compact discs (CDs) or digital versatile discs (DVDs), any suitable combination thereof, etc. Computer-readable media may store thereon code and / or machine-executable instructions that may represent any combination of a process, function, subroutine, program, routine, subroutine, module, engine, software package, class, or instruction, data structure, or program statement. A code segment may be coupled to another code segment or hardware circuit by passing and / or receiving information, data, independent variables, parameters, or memory contents. Information, arguments, parameters, data, etc. may be passed, forwarded, or sent via any suitable means, including memory sharing, message passing, token passing, network sending, etc.

[0163] In some aspects, computer readable storage devices, media, and memories may include cables or wireless signals containing bit streams, etc. However, when referred to, non-transitory computer readable storage media specifically excludes media such as power consumption, carrier signals, electromagnetic waves, and signals themselves.

[0164] Devices implementing the processes and methods according to these disclosures may include hardware, software, firmware, middleware, microcode, hardware description languages, or any combination thereof, and may take any of a variety of form factors. When implemented in software, firmware, middleware, or microcode, program code or code segments (e.g., computer program products) for performing necessary tasks may be stored in a computer-readable or machine-readable medium. The processor may perform the necessary tasks. Typical examples of form factors include laptop computers, smart phones, mobile phones, tablet devices, or other small form factor personal computers, personal digital assistants, rack-mounted devices, stand-alone devices, etc. The functionality described herein may also be embodied in peripheral devices or add-in cards. By way of additional examples, such functionality may also be implemented on circuit boards among different chips or different processes executed on a single device.

[0165] Instructions, media for conveying such instructions, computing resources for executing them, and other structures for supporting such computing resources are example components for providing the functionality described in this disclosure.

[0166] In the above description, various aspects of the present application are described with reference to their specific aspects, but those skilled in the art will recognize that the present application is not limited thereto. Thus, although the exemplary aspects of the present application have been described in detail herein, it is to be understood that each inventive concept can be implemented and adopted in various other ways, and the appended claims are not intended to be interpreted as including these variations, unless limited by the prior art. Various features and aspects of the above-mentioned applications can be used individually or in combination. In addition, various aspects can be utilized in any number of environments and applications beyond those described herein without departing from the broader essence and scope of this specification. Therefore, the description and the accompanying drawings should be considered as illustrative rather than restrictive. For the purpose of illustration, each method is described in a specific order. It should be appreciated that, in alternative aspects, each method can be performed in a different order than described.

[0167] One of ordinary skill in the art will appreciate that the less than ("<") and greater than (">") symbols or terms used herein may be replaced by less than or equal to ("≤") and greater than or equal to ("≥") symbols, respectively, without departing from the scope of this specification.

[0168] Where a component is described as being “configured to” perform certain operations, such configuration may be achieved, for example, by designing electronic circuits or other hardware to perform the operations, by programming programmable electronic circuits (e.g., a microprocessor or other suitable electronic circuits) to perform the operations, or any combination thereof.

[0169] The phrase "coupled to" means that any component is directly or indirectly physically connected to another component, and / or any component is directly or indirectly in communication with another component (e.g., connected to another component via a wired or wireless connection and / or other suitable communication interface).

[0170] Claim language or other language stating "at least one of" a set and / or "one or more of" a set indicates that one member of the set or multiple members of the set (in any combination) satisfies the claim. For example, claim language stating "at least one of A and B" or "at least one of A or B" means A, B, or A and B. In another example, claim language stating "at least one of A, B, and C" or "at least one of A, B, or C" means A, B, C, or A and B, or A and C, or B and C, or A and B and C. The language "at least one of" a set and / or "one or more of" a set does not limit the set to the items listed in the set. For example, claim language stating "at least one of A and B" or "at least one of A or B" may mean A, B, or A and B, and may additionally include items not listed in the set of A and B.

[0171] Various exemplary logic blocks, modules, engines, circuits and algorithmic steps described in conjunction with aspects disclosed herein can be implemented as electronic hardware, computer software, firmware or a combination thereof. In order to clearly illustrate this interchangeability of hardware and software, various exemplary components, blocks, modules, circuits and steps have been generally described in terms of their functionality. Whether such functionality is implemented as hardware or software depends on the specific application and the design constraints proposed for the entire system. The technician can implement the described functionality in different ways for each specific application, but such specific implementation decisions should not be interpreted as departing from the scope of the present application.

[0172] The techniques described herein may also be implemented in electronic hardware, computer software, firmware, or any combination thereof. Such techniques may be implemented in any of a variety of devices, such as general-purpose computers, wireless communication devices, or integrated circuit devices with multiple uses, including applications in wireless communication devices, mobile phones, and other devices. Any features described as modules or components may be implemented together in an integrated logic device or separately as discrete but interoperable logic devices. If implemented in software, these techniques may be implemented at least in part by a computer-readable data storage medium including a program code, the program code including instructions that execute one or more of the above methods when executed. A computer-readable data storage medium may form part of a computer program product, which may include packaging materials. A computer-readable medium may include a memory or data storage medium, such as a random access memory (RAM) (such as a synchronous dynamic random access memory (SDRAM)), a read-only memory (ROM), a non-volatile random access memory (NVRAM), an electrically erasable programmable read-only memory (EEPROM), a flash memory, a magnetic or optical data storage medium, and the like. Additionally or alternatively, the technology may be implemented at least in part by a computer-readable communication medium that carries or communicates program code in the form of instructions or data structures and that can be accessed, read, and / or executed by a computer, such as a propagated signal or wave.

[0173] The program code may be executed by a processor, which may include one or more processors, such as one or more digital signal processors (DSPs), general-purpose microprocessors, application-specific integrated circuits (ASICs), field programmable logic arrays (FPGAs), or other equivalent integrated or discrete logic circuits. Such processors may be configured to perform any of the techniques described in this disclosure. A general-purpose processor may be a microprocessor; however, in an alternative, the processor may be any conventional processor, controller, microcontroller, or state machine. The processor may also be implemented as a combination of computing devices, such as a combination of a DSP and a microprocessor, multiple microprocessors, one or more microprocessors combined with a DSP core, or any other such configuration. Therefore, the term "processor" as used herein may refer to any of the aforementioned structures, any combination of the aforementioned structures, or any other structure or device suitable for implementing the techniques described herein.

[0174] Illustrative aspects of the present disclosure include:

[0175] Aspect 1: A method of ray tracing, the method comprising: obtaining a hierarchical acceleration data structure, the hierarchical acceleration data structure comprising multiple primitives of a scene object; obtaining a corresponding information value associated with each primitive included in the multiple primitives; determining a sorting order of the two or more nodes included in the same level of the hierarchical acceleration data structure at least in part by sorting the two or more nodes included in the same level of the hierarchical acceleration data structure based on a corresponding sorting parameter value determined for each corresponding node in the two or more nodes, wherein each corresponding sorting parameter value is based on at least one information value associated with one or more primitives included in a subtree of each corresponding node in the two or more nodes; and traversing the hierarchical acceleration data structure using the sorting order.

[0176] Aspect 2: The method according to aspect 1, wherein each respective information value associated with each primitive comprises at least one of a surface area heuristic (SAH) value, an opacity value, or a density value.

[0177] Aspect 3: A method according to any one of Aspects 1 to 2, wherein each corresponding information value associated with each primitive includes at least one of an area value, a distance value between each corresponding primitive and a camera associated with the scene object, or a level of detail (LOD) value.

[0178] Aspect 4: The method according to any one of aspects 1 to 3, wherein each respective information value associated with each primitive is included as an entry in a rendering list associated with the scene object.

[0179] Aspect 5: The method according to any one of aspects 1 to 4, wherein each respective information value associated with each primitive is obtained as input to a ray tracing application programming interface (API).

[0180] Aspect 6: A method according to any one of Aspects 1 to 5, wherein each corresponding sorting parameter value determined for each corresponding node among the two or more nodes includes a calculated value based on the sorting parameter values ​​determined for one or more child nodes associated with each corresponding node.

[0181] Aspect 7: The method according to aspect 6, wherein the calculated value is an average value of the corresponding ranking parameter values ​​determined for the one or more child nodes.

[0182] Aspect 8: The method according to any one of aspects 6 to 7, wherein the calculated value is determined based on a function calculation specified as an input to a ray tracing application programming interface (API).

[0183] Aspect 9: According to the method described in any one of Aspects 1 to 8, the method further includes: determining a corresponding sorting parameter value for each corresponding node of one or more nodes included in the first level of the hierarchical acceleration data structure; and determining a corresponding sorting parameter value for each corresponding node of one or more nodes included in the second level of the hierarchical acceleration data structure based on the corresponding sorting parameter value determined for each corresponding node of the one or more nodes included in the first level.

[0184] Aspect 10: The method according to aspect 9, wherein the one or more nodes included in the first level are child nodes of the one or more nodes included in the second level.

[0185] Aspect 11: A method according to any one of Aspects 9 to 10, wherein: the one or more nodes included in the first level are leaf nodes of the hierarchical acceleration data structure, each corresponding leaf node is associated with one or more primitives among the multiple primitives; and the corresponding sorting parameter value determined for each corresponding leaf node includes a calculated value based on at least one information value determined for one or more primitives associated with each corresponding leaf node.

[0186] Aspect 12: The method according to any one of aspects 1 to 11, wherein the sorting order is based on a decreasing order of each respective sorting parameter value associated with each respective node of the two or more nodes.

[0187] Aspect 13: According to the method described in any one of Aspects 1 to 12, the method further includes: using the sorting order to perform a depth-first search (DFS) traversal of the hierarchical acceleration data structure, wherein the sorting order is determined based on at least one information value associated with each of the multiple primitives and at least one sorting parameter value associated with each of the multiple nodes included in the hierarchical acceleration data structure.

[0188] Aspect 14: A method according to any one of Aspects 1 to 13, wherein the information value includes an opacity value, wherein at least a first value of the opacity value indicates an opaque primitive, and wherein at least a second value of the opacity value indicates a non-opaque primitive.

[0189] Aspect 15: A method according to any one of Aspects 1 to 14, wherein traversing the hierarchical acceleration data structure includes traversing from a parent node to a selected child node associated with the parent node, wherein the selected child node is selected based on a sorting parameter value associated with the selected child node.

[0190] Aspect 16: The method according to aspect 15, wherein the selected child node is selected from one or more child nodes associated with the parent node, and wherein the selected child node is associated with a maximum sorting parameter value or a minimum sorting parameter value of the one or more child nodes.

[0191] Aspect 17: A method according to any one of Aspects 1 to 16, wherein traversing the hierarchical acceleration data structure includes: generating an updated hierarchical acceleration data structure based on the sorting order, wherein the multiple primitives included in the updated hierarchical acceleration data structure are the same as the multiple primitives included in the hierarchical acceleration data structure.

[0192] Aspect 18: A method according to Aspect 17, wherein the updated hierarchical acceleration data structure: includes a plurality of nodes, each corresponding node of the plurality of nodes is included in a corresponding level of the plurality of levels included in the hierarchical acceleration data structure; and is generated based on sorting one or more nodes included in each corresponding level of the plurality of levels, so that a depth-first search (DFS) traversal of the updated hierarchical acceleration data structure traverses the plurality of nodes in the sorted order.

[0193] Aspect 19: The method according to any one of aspects 1 to 18, the method further comprising: generating ray-traced graphics content based on traversing the hierarchical acceleration data structure using the sorted order.

[0194] Aspect 20: A device for ray tracing, the device comprising: a memory; and one or more processors coupled to the memory, the one or more processors being configured to: obtain a hierarchical acceleration data structure, the hierarchical acceleration data structure comprising multiple primitives of a scene object; obtain corresponding information values ​​associated with each primitive included in the multiple primitives; determine a sorting order of the two or more nodes included in the same level of the hierarchical acceleration data structure at least in part by sorting the two or more nodes included in the same level of the hierarchical acceleration data structure based on corresponding sorting parameter values ​​determined for each corresponding node in the two or more nodes, wherein each corresponding sorting parameter value is based on at least one information value associated with one or more primitives included in a subtree of each corresponding node in the two or more nodes; and traverse the hierarchical acceleration data structure using the sorting order.

[0195] Aspect 21: The apparatus of aspect 20, wherein each respective information value associated with each primitive comprises at least one of a surface area heuristic (SAH) value, an opacity value, or a density value.

[0196] Aspect 22: An apparatus according to any one of Aspects 20 to 21, wherein each respective information value associated with each primitive comprises at least one of an area value, a distance value between each respective primitive and a camera associated with the scene object, or a level of detail (LOD) value.

[0197] Aspect 23: The apparatus of any one of aspects 20 to 22, wherein each respective information value associated with each primitive is obtained as input to a ray tracing application programming interface (API).

[0198] Aspect 24: An apparatus according to any one of Aspects 20 to 23, wherein each respective sorting parameter value determined for each respective node of the two or more nodes comprises a calculated value based on sorting parameter values ​​determined for one or more child nodes associated with each respective node.

[0199] Aspect 25: An apparatus according to Aspect 24, wherein the calculated value is an average of the corresponding sorting parameter values ​​determined for the one or more child nodes, or is determined based on a function calculation specified as an input to a ray tracing application programming interface (API).

[0200] Aspect 26: An apparatus according to any one of Aspects 20 to 25, wherein the one or more processors are further configured to: determine a corresponding sorting parameter value for each corresponding node of one or more nodes included in a first level of the hierarchical acceleration data structure; and determine a corresponding sorting parameter value for each corresponding node of one or more nodes included in a second level of the hierarchical acceleration data structure based on the corresponding sorting parameter value determined for each corresponding node of the one or more nodes included in the first level.

[0201] Aspect 27: An apparatus according to aspects 26, wherein: the one or more nodes included in the first level are leaf nodes of the hierarchical acceleration data structure, each corresponding leaf node being associated with one or more primitives of the plurality of primitives; and the corresponding sorting parameter value determined for each corresponding leaf node includes a calculated value based on at least one information value determined for one or more primitives associated with each corresponding leaf node.

[0202] Aspect 28: A non-transitory computer-readable medium having instructions stored thereon, the instructions, when executed by one or more processors, causing the one or more processors to: obtain a hierarchical acceleration data structure, the hierarchical acceleration data structure comprising a plurality of primitives of a scene object; obtain a corresponding information value associated with each primitive included in the plurality of primitives; determine a sorting order of the two or more nodes included in the same level of the hierarchical acceleration data structure at least in part by sorting the two or more nodes included in the same level of the hierarchical acceleration data structure based on a corresponding sorting parameter value determined for each corresponding node in the two or more nodes, wherein each corresponding sorting parameter value is based on at least one information value associated with one or more primitives included in a subtree of each corresponding node in the two or more nodes; and traverse the hierarchical acceleration data structure using the sorting order.

[0203] Aspect 29: The non-transitory computer-readable medium of aspect 28, wherein each respective information value associated with each primitive comprises at least one of a surface area heuristic (SAH) value, an opacity value, or a density value.

[0204] Aspect 30: A non-transitory computer-readable medium according to any one of Aspects 28 to 29, wherein the one or more processors are further configured to: determine a corresponding sorting parameter value for each corresponding node of one or more nodes included in a first level of the hierarchical acceleration data structure; and determine a corresponding sorting parameter value for each corresponding node of one or more nodes included in a second level of the hierarchical acceleration data structure based on the corresponding sorting parameter value determined for each corresponding node of the one or more nodes included in the first level.

[0205] Aspect 31: An apparatus comprising means for performing any of the operations of Aspects 1 to 30.

[0206] Aspect 32: A non-transitory computer-readable storage medium having instructions stored thereon, the instructions, when executed by one or more processors, causing the one or more processors to perform any of the operations according to aspects 1 to 30.

Claims

1. A ray tracing method, the method comprising: Obtaining a hierarchical acceleration data structure, the hierarchical acceleration data structure comprising a plurality of primitives of a scene object; obtaining a corresponding information value associated with each primitive included in the plurality of primitives; determining a sort order of the two or more nodes included in a same level of the hierarchical acceleration data structure at least in part by sorting the two or more nodes included in a same level of the hierarchical acceleration data structure based on respective sort parameter values ​​determined for each respective one of the two or more nodes, wherein each respective sort parameter value is based on at least one information value associated with one or more primitives included in a subtree of each respective one of the two or more nodes; as well as The hierarchical acceleration data structure is traversed using the sorted order.

2. The method of claim 1, wherein each respective information value associated with each primitive comprises at least one of a surface area heuristic (SAH) value, an opacity value, or a density value.

3. The method of claim 1 , wherein each respective information value associated with each primitive comprises at least one of an area value, a distance value between each respective primitive and a camera associated with the scene object, or a level of detail (LOD) value. 4 . The method of claim 1 , wherein each respective information value associated with each primitive is included as an entry in a render list associated with the scene object.

5. The method of claim 1, wherein each respective information value associated with each primitive is obtained as input to a ray tracing application programming interface (API).

6. The method of claim 1, wherein each respective ranking parameter value determined for each respective node of the two or more nodes comprises a calculated value based on ranking parameter values ​​determined for one or more child nodes associated with each respective node. The method of claim 6 , wherein the calculated value is an average of the corresponding ranking parameter values ​​determined for the one or more child nodes.

8. The method of claim 6, wherein the calculated value is determined based on a function calculation specified as an input to a ray tracing application programming interface (API).

9. The method according to claim 1, further comprising: determining a respective sorting parameter value for each respective node of the one or more nodes included in a first level of the hierarchical acceleration data structure; as well as Based on the respective sorting parameter values ​​determined for each respective one of the one or more nodes included in the first level, respective sorting parameter values ​​are determined for each respective one of the one or more nodes included in a second level of the hierarchical acceleration data structure. 10 . The method of claim 9 , wherein the one or more nodes included in the first level are child nodes of the one or more nodes included in the second level.

11. The method according to claim 9, wherein: The one or more nodes included in the first level are leaf nodes of the hierarchical acceleration data structure, each respective leaf node being associated with one or more primitives of the plurality of primitives; and The respective ordering parameter value determined for each respective leaf node includes a calculated value based on at least one information value determined for one or more primitives associated with each respective leaf node.

12. The method of claim 1, wherein the sort order is based on a decreasing order of each respective sort parameter value associated with each respective node of the two or more nodes.

13. The method according to claim 1 further includes using the sorting order to perform a depth-first search (DFS) traversal of the hierarchical acceleration data structure, wherein the sorting order is determined based on at least one information value associated with each of the multiple primitives and at least one sorting parameter value associated with each of the multiple nodes included in the hierarchical acceleration data structure.

14. The method of claim 1, wherein the information value comprises an opacity value, wherein at least a first value of the opacity value indicates an opaque primitive, and wherein at least a second value of the opacity value indicates a non-opaque primitive.

15. The method of claim 1, wherein traversing the hierarchical acceleration data structure comprises traversing from a parent node to a selected child node associated with the parent node, wherein the selected child node is selected based on a sorting parameter value associated with the selected child node.

16. The method of claim 15, wherein the selected child node is selected from one or more child nodes associated with the parent node, and wherein the selected child node is associated with a maximum ranking parameter value or a minimum ranking parameter value of the one or more child nodes.

17. The method of claim 1, wherein traversing the hierarchical acceleration data structure comprises: An updated hierarchical acceleration data structure is generated based on the sorted order, wherein a plurality of primitives included in the updated hierarchical acceleration data structure are the same as the plurality of primitives included in the hierarchical acceleration data structure.

18. The method of claim 17, wherein the updated hierarchical acceleration data structure: including a plurality of nodes, each respective node of the plurality of nodes being included in a respective level of a plurality of levels included in the hierarchical acceleration data structure; and The updated hierarchical acceleration data structure is generated based on sorting one or more nodes included in each corresponding level in the plurality of levels, so that a depth-first search (DFS) traversal of the updated hierarchical acceleration data structure traverses the plurality of nodes in the sorted order.

19. The method of claim 1, further comprising generating ray traced graphics content based on traversing the hierarchical acceleration data structure using the sorted order.

20. An apparatus for ray tracing, the apparatus comprising: at least one memory; as well as at least one processor coupled to the at least one memory, the at least one processor being configured to: Obtaining a hierarchical acceleration data structure, the hierarchical acceleration data structure comprising a plurality of primitives of a scene object; obtaining a corresponding information value associated with each primitive included in the plurality of primitives; determining a sort order of the two or more nodes included in a same level of the hierarchical acceleration data structure at least in part by sorting the two or more nodes included in a same level of the hierarchical acceleration data structure based on respective sort parameter values ​​determined for each respective one of the two or more nodes, wherein each respective sort parameter value is based on at least one information value associated with one or more primitives included in a subtree of each respective one of the two or more nodes; as well as The hierarchical acceleration data structure is traversed using the sorted order.

21. The apparatus of claim 20, wherein each respective information value associated with each primitive comprises at least one of a surface area heuristic (SAH) value, an opacity value, or a density value.

22. The apparatus of claim 20, wherein each respective information value associated with each primitive comprises at least one of an area value, a distance value between each respective primitive and a camera associated with the scene object, or a level of detail (LOD) value.

23. The apparatus of claim 20, wherein each respective information value associated with each primitive is obtained as input to a ray tracing application programming interface (API).

24. The apparatus of claim 20, wherein each respective ranking parameter value determined for each respective node of the two or more nodes comprises a calculated value based on ranking parameter values ​​determined for one or more child nodes associated with each respective node.

25. The apparatus of claim 24, wherein the calculated value is an average of the corresponding sorting parameter values ​​determined for the one or more child nodes, or is determined based on a function calculation specified as an input to a ray tracing application programming interface (API).

26. The apparatus of claim 20, wherein the at least one processor is further configured to: determining a respective sorting parameter value for each respective one of the one or more nodes included in a first level of the hierarchical acceleration data structure; and Based on the respective sorting parameter values ​​determined for each respective one of the one or more nodes included in the first level, respective sorting parameter values ​​are determined for each respective one of the one or more nodes included in a second level of the hierarchical acceleration data structure.

27. The apparatus of claim 26, wherein: The one or more nodes included in the first level are leaf nodes of the hierarchical acceleration data structure, each respective leaf node being associated with one or more primitives of the plurality of primitives; and The respective ordering parameter value determined for each respective leaf node includes a calculated value based on at least one information value determined for one or more primitives associated with each respective leaf node.

28. A non-transitory computer readable medium having stored thereon instructions that, when executed by one or more processors, cause the one or more processors to: Obtaining a hierarchical acceleration data structure, the hierarchical acceleration data structure comprising a plurality of primitives of a scene object; obtaining a corresponding information value associated with each primitive included in the plurality of primitives; determining a sort order of the two or more nodes included in a same level of the hierarchical acceleration data structure at least in part by sorting the two or more nodes included in a same level of the hierarchical acceleration data structure based on respective sort parameter values ​​determined for each respective one of the two or more nodes, wherein each respective sort parameter value is based on at least one information value associated with one or more primitives included in a subtree of each respective one of the two or more nodes; as well as The hierarchical acceleration data structure is traversed using the sorted order.

29. The non-transitory computer-readable medium of claim 28, wherein each respective information value associated with each primitive comprises at least one of a surface area heuristic (SAH) value, an opacity value, or a density value.

30. The non-transitory computer readable medium of claim 28, wherein the one or more processors are further configured to: determining a respective sorting parameter value for each respective one of the one or more nodes included in a first level of the hierarchical acceleration data structure; and Based on the respective sorting parameter values ​​determined for each respective one of the one or more nodes included in the first level, respective sorting parameter values ​​are determined for each respective one of the one or more nodes included in a second level of the hierarchical acceleration data structure.