# US 8,018,457 B2 · Ray tracing system architectures and methods

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 8,018,457 B2
- Document ID: US8018457B2
- Status: Granted
- Kind: B2
- Application number: 12/555,766
- Filed: 2009-09-08
- Published: 2009-12-31
- Granted: 2011-09-13
- Earliest claimed: 2006-09-19
- Assignees: Caustic Graphics, Inc.
- Inventors: Luke Tilman Peterson; James Alexander McCombe; Ryan R. Salsbury; Steven John Clohset
- Web page: https://patentgrep.com/patent/US8018457B2

## CPC

- G06T 15/06: Ray-tracing
- G06T 1/60: Memory management
- G06T 15/08: Volume rendering
- G06T 15/80: Shading
- G06T 2215/12: Shadow map, environment map
- G09G 5/006: {Details of the interface to the display terminal (specific for a display terminal using a CRT G09G1/167; using a flat panel G09G3/2096; circuits for interfacing with colour displays G09G5/04)}
- G09G 5/393: Arrangements for updating the contents of the bit-mapped memory
- G09G 2360/121: using a cache memory
- G09G 2370/10: Use of a protocol of communication by packets in interfaces along the display data pipeline
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G09G: ARRANGEMENTS OR CIRCUITS FOR CONTROL OF INDICATING DEVICES USING STATIC MEANS TO PRESENT VARIABLE INFORMATION (arrangements for transferring data between digital computers and displays G06F3/14; static indicating arrangements comprising an association of a number of separate sources or light control cells G09F9/00; static indicating arrangements comprising integral associations of a number of light sources H01J, H01K, H10H, H05B33/12; scanning, transmission or reproduction of documents or the like, e.g. facsimile transmission, details thereof H04N1/00)

## Abstract

Aspects comprise systems implementing ray tracing functionality according to example architectures. In one example, rays are collected into collections against elements of an acceleration structure, which in some cases are associated with objects composing a scene being ray traced. Indications of detected ray intersections also can be collected in an output buffer, and in some examples, the output buffer can comprise a plurality of portions, each associated with a scene object, or a common portion of code to be executed during shading. Buffer contents can be accessed in a block read. An intersection shading resource can load data to be used in shading the intersections for the identified rays, and locally storing that data for use in shading those intersections.

## Claims

### Claim 1

A system for use in ray-tracing-based 3-D scene rendering, comprising:
an intersection tester comprising:
an access port to a memory storing definition data for a plurality of rays to be intersection tested in a 3-D scene,
one or more test cells operable for testing rays of the plurality for intersection with one or more of (1) primitives composing the 3-D scene and (2) elements of an acceleration structure each identifying respective selections of the primitives, and
an output buffer, comprising a memory, coupled for receiving indications of detected intersections between rays and respective primitives, the output buffer configured for storing the received indications pending a block output of at least some of the stored indications; and
a processor coupled for receiving the block output of stored indications from the output buffer and executing shader modules comprising code to be executed.

### Claim 2 (depends on 1)

The system of claim 1, wherein the output buffer comprises a plurality of buffer portions, and the intersection tester comprises a sorter coupled to the output buffer configured for sorting the indications of detected intersections among the buffer portions, based on commonality of shading code to be run for shading the detected intersections.

### Claim 3 (depends on 2)

The system of claim 2, wherein the block output comprises the indications stored in a buffer portion.

### Claim 4 (depends on 1)

The system of claim 1, wherein the indications stored in the output buffer each comprise a ray identifier.

### Claim 5 (depends on 1)

The system of claim 1, wherein the block output comprises identifiers for rays and closest detected intersection information for those rays.

### Claim 6 (depends on 1)

The system of claim 1, wherein the primitives are each identified with respective identifiers, each indicative of a scene object of which that primitive is a part, and further comprising a sorter coupled with the output buffer and operable to use primitive identifiers for sorting ray identifiers associated with the primitive identifiers into a plurality of buffer portions comprising the output buffer.

### Claim 7 (depends on 1)

The system of claim 1, wherein the block output is representative of one or more groupings of identifiers for rays that may need to have common portions of code executed for shading; and the processor is configured by one or more of those common portions of code for shading prior to execution of those common code portions as the shader modules for shading ray intersections of the one or more groupings.

### Claim 8 (depends on 1)

The system of claim 1, wherein the processor is operable for block retrieval of shading data responsive to block output of stored indications, and for storage of the shading data in a cache for local access during shading of the indicated intersections.

### Claim 9 (depends on 1)

The system of claim 1, wherein contents of the output buffer indicate plural detected possible intersections for a given ray, and the system is configured for performing final intersection testing among those detected possible intersections to identify an actual intersection for that ray prior to executing one or more shader modules comprising code to be executed for that actual intersection.

### Claim 10 (depends on 1)

The system of claim 1, further comprising a controller operable to make collections of rays, at least some of the collections associated with respective scene objects composing the 3-D scene.

### Claim 11

A machine-implemented method pertaining to 3-D scene rendering with ray tracing, comprising:
providing shapes comprising scene objects in a 3-D scene to be rendered, the objects composed of primitives, and an acceleration structure comprising elements that bound selections of the primitives;
defining a plurality of rays to be processed, the processing for each ray comprising identifying a respective closest intersection, if any, with the primitives and shading such an intersection by executing one or more code modules; and
performing the processing for each of the rays, the performance of the processing scheduled by making collections of the rays based on outputs produced during processing, each ray being concurrently collectible into a plurality of the collections, represented by data stored in a tangible memory, each collection associated with at least one of the shapes, and selecting rays for performance of further processing by selecting one or more collections to which those rays belong.

### Claim 12 (depends on 11)

The machine-implemented method of claim 11, wherein collections are associated with a shape by collection into a collection associated with an acceleration geometry element bounding at least one primitive composing that shape.

### Claim 13 (depends on 11)

The machine-implemented method of claim 11, wherein the code modules for execution are determined by which primitive was intersected.

### Claim 14 (depends on 11)

The machine-implemented method of claim 11, wherein the identifying a respective closest intersection, if any, with the primitives results in outputting an association between a unique primitive identifier and the ray.

### Claim 15 (depends on 11)

The machine-implemented method of claim 11, wherein the providing of the shapes comprises providing an identifier for each of the primitives composing the scene objects, a portion of each identifier identifying the scene object to which the primitive belongs.

### Claim 16 (depends on 11)

The machine-implemented method of claim 11, further comprising, after identifying a closest primitive intersection for a number of the rays, sorting those rays based on scene object.

### Claim 17 (depends on 11)

The machine-implemented method of claim 11, wherein the sorting uses a respective unique identifier associated with each of the primitives, which also can be used to identify the scene object of which the primitive is a part.

### Claim 18 (depends on 11)

The machine-implemented method of claim 11, wherein the identifying of the respective closest intersection comprises traversal of an acceleration structure that sub-divides a 3-D scene, resulting in possible identification of subsets of primitives composing the 3-D scene, against which the rays are to be tested for intersection, and testing each ray against its respective primitive subset for a closest intersection, if any.

### Claim 19 (depends on 11)

The machine-implemented method of claim 11, wherein the performing of the processing comprises deferring further processing of individual rays until determining that a ray collection is ready, and then performing a subsequent iteration of processing for rays of that ready collection.

### Claim 20 (depends on 11)

The machine-implemented method of claim 11, wherein the performing of the processing takes place in a plurality of iterations and the iterations comprise one or more iterations wherein rays are collected into collections that are each associated with a scene object.

### Claim 21 (depends on 11)

The machine-implemented method of claim 11, wherein the ray collections are formed from identifiers for the collected rays.

### Claim 22 (depends on 11)

The machine-implemented method of claim 11, wherein associating ray collections with shapes is performed for one or more of traversal of the acceleration structure and for outputting information for rays that have completed intersection testing.

### Claim 23 (depends on 11)

The machine-implemented method of claim 11, wherein the outputs produced during processing comprise a determination that a common portion of shading code is to be run for a plurality of the intersections.

### Claim 24

A component for a ray tracing system, comprising:
an input for receiving identifiers of rays that have been found to intersect a primitive composing a 3-D scene being ray traced;
a plurality of buffers implemented in one or more tangible memories;
a sorter coupled to the plurality of buffers and to the input and operable to disperse the ray identifiers among the plurality of buffers for storage, grouping the identifiers for rays that are expected to require one or more of common shading code and common shading data for shading their respective intersections; and
an output, coupled with the plurality of buffers, for sending contents of a selected buffer to a computation resource-to be configured for shading intersections for the rays identified by identifiers stored in the selected buffer.

### Claim 25 (depends on 24)

The component of claim 24, wherein the sorter is operable to use an identifier for a primitive intersected by each ray in determining whether one or more of common shading code and common shading data will be used during shading of intersections for different rays.

### Claim 26 (depends on 25)

The component of claim 25, wherein the primitive identifiers each include a portion that identifies an object of which that primitive is a part, each object associated with one or more of respective shading code and shading data, such that rays hitting that same object are expected to have intersections shaded with one or more of common shading code and common shading data.

### Claim 27

A tangible computer readable medium storing instructions for implementing a process for providing a ray tracing system, comprising:
providing an intersection testing resource operable for concurrent intersection testing of a plurality of rays in a 3-D scene, resulting in identification of detected valid intersections for at least some of the plurality of rays;
providing an intersection shading resource for configuration to run shading code for shading detected valid ray intersections; and
providing for communication between the intersection testing resource and the shading resource, the communication implemented by outputting one or more groupings of information for the detected intersections, the groupings determined based on an expectation that each intersection of each group will be shaded with one or more of common shading code and common shading data.

### Claim 28 (depends on 27)

The tangible computer readable medium of claim 27, wherein the process provides communication between the intersection testing resource and the intersection shading resource through buffering operable to collect information for detected valid intersections from a plurality concurrent intersection tests involving different rays, the buffering storing the groupings of information pending a selection of a grouping for output.

### Claim 29 (depends on 27)

The tangible computer readable medium of claim 27, wherein the information comprised in the groupings comprises ray identifiers.

### Claim 30 (depends on 27)

The tangible computer readable medium of claim 27, wherein the groupings are formed by sorting rays based on identification information for respective primitives they intersected.

### Claim 31 (depends on 27)

The tangible computer readable medium of claim 27,wherein the process further comprises providing for buffering of new ray data from the shading resource to the intersection testing resource, the buffering of new ray data comprising collecting new ray data from a plurality of shader code modules for initiation of concurrent intersection testing of those new rays.

### Claim 32 (depends on 27)

The tangible computer readable medium of claim 27, wherein the process further comprises providing control scheduling of one or more threads to function as the shading resource for executing the common shading code.

### Claim 33 (depends on 1)

The system of claim 1, wherein the processor implements the intersection tester.

### Claim 34 (depends on 33)

The system of claim 33, wherein the test cells comprise one or more of fixed function hardware and programmable portions of the processor configured for testing rays of the plurality of intersection.
