# US 2025/0166282 A1 · Intersection testing in a ray tracing system

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

- Number: US 2025/0166282 A1
- Document ID: US20250166282A1
- Status: Published application
- Kind: A1
- Application number: 18/900,366
- Filed: 2024-09-27
- Published: 2025-05-22
- Earliest claimed: 2023-09-29
- Applicants: Imagination Technologies Limited
- Inventors: Peter Smith-Lacey; Gregory Clark
- Web page: https://patentgrep.com/patent/US20250166282A1

## CPC

- G06T 15/06: Ray-tracing
- G06T 7/13: Edge detection
- G06T 2210/21: Collision detection, intersection
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

A method of performing intersection testing in a ray tracing system, for a ray with respect to a set of two or more primitives. Each primitive is defined by an ordered set of edges, and each edge is defined by a respective pair of vertices. A set of distinct edges is determined for the set of primitives, each distinct edge being part of at least one primitive of the set of primitives and being defined by a different pair of vertices to the other distinct edges in the set, wherein every edge in the ordered sets of edges that define the set of primitives is represented by a distinct edge of the set of distinct edges. For each distinct edge in the set of distinct edges, an edge test is performed to determine which side of the distinct edge the ray passes on. For each primitive in the set of primitives, a result of the edge test is used for each distinct edge that defines that primitive to determine whether or not the ray intersects that primitive.

## Claims

### Claim 1

A method of performing intersection testing in a ray tracing system, for a ray with respect to a set of two or more primitives, each primitive being defined by an ordered set of edges, each edge being defined by a respective pair of vertices, the method comprising:
determining a set of distinct edges for the set of primitives, each distinct edge being part of at least one primitive of the set of primitives and being defined by a different pair of vertices to the other distinct edges in the set, wherein every edge in the ordered sets of edges that define the set of primitives is represented by a distinct edge of the set of distinct edges;
for each distinct edge in the set of distinct edges, performing an edge test to determine which side of the distinct edge the ray passes on; and
for each primitive in the set of primitives, using a result of the edge test for each distinct edge that defines that primitive to determine whether or not the ray intersects that primitive.

### Claim 2 (depends on 1)

The method of claim 1, wherein the ray is determined to intersect a primitive if the results of the edge tests for each distinct edge that defines the primitive indicate that the ray passes on the inside of each of the edges of the primitive.

### Claim 3 (depends on 1)

The method of claim 1, wherein determining the set of distinct edges comprises performing pairwise comparisons between respective pairs of vertices that define the edges of the primitives in the set of primitives to identify instances of edges that are defined by a common pair of vertices, and defining a single instance of an edge defined by the common pair of vertices as a distinct edge.

### Claim 4 (depends on 1)

The method of claim 1, further comprising storing an edge index for each distinct edge in the set of distinct edges, wherein each edge index represents a corresponding distinct edge in the set of distinct edges.

### Claim 5 (depends on 1)

The method of claim 1, further comprising storing a mapping to each distinct edge in the set of distinct edges from one or more primitives in the set of primitives that are defined by that distinct edge.

### Claim 6 (depends on 5)

The method of claim 5, wherein storing a mapping to a distinct edge against one or more primitives comprises storing an identifier for each primitive in the set of primitives, the identifier for each primitive being formed of a plurality of respective edge indices, wherein each edge index of the primitive identifier represents a corresponding edge that defines the primitive.

### Claim 7 (depends on 1)

The method of claim 1, further comprising:
determining a set of distinct primitives for the set of primitives, each distinct primitive being defined by a different set of vertices from the other distinct primitives in the set of distinct primitives; and
storing a mapping to each distinct edge in the set of distinct edges from one or more of the distinct primitives in the set of distinct primitives that are defined by that distinct edge;
wherein the determination of whether or not the ray has intersected a primitive is performed only for the distinct primitives in the set of distinct primitives.

### Claim 8 (depends on 7)

The method of claim 7, wherein determining the set of distinct primitives comprises performing pairwise comparisons between respective sets of vertices, each set of vertices defining a primitive in the set of primitives to identify instances of primitives that are defined by a common set of vertices, and defining a single instance of a primitive defined by the common set of vertices as a distinct primitive.

### Claim 9 (depends on 1)

The method of claim 1, wherein at least one distinct edge of the set of distinct edges represents an edge that is shared by two or more primitives in the set of primitives.

### Claim 10 (depends on 1)

The method of claim 1, further comprising:
determining a set of distinct vertices for the set of primitives, each distinct vertex being part of at least one primitive of the set of primitives and being defined by a different set of 3D coordinates from the other distinct vertices in the set of distinct vertices; and
storing a mapping to each distinct vertex in the set of distinct vertices from one or more edges in the set of distinct edges that are defined by that distinct vertex.

### Claim 11 (depends on 10)

The method of claim 10, wherein storing a mapping to a distinct vertex against one or more edges comprises storing an identifier for each distinct edge, the identifier for each distinct edge being formed of two respective vertex indices, wherein each vertex index of the distinct edge identifier represents a corresponding vertex of the pair of vertices that defines the edge.

### Claim 12 (depends on 10)

The method of claim 10, further comprising storing vertex data for each distinct vertex in the set of distinct vertices, the vertex data comprising a set of coordinate indices, each coordinate index indicating a 3D coordinate of the vertex.

### Claim 13 (depends on 10)

The method of claim 10, further comprising projecting each distinct vertex of the set of distinct vertices from a 3D space into 2D ray space.

### Claim 14 (depends on 13)

The method of claim 13, wherein the edge test to determine which side of a distinct edge the ray passes on is performed using the results of distinct vertex projection.

### Claim 15 (depends on 13)

The method of claim 13, further comprising storing the results from the projection of each distinct vertex of the set of distinct vertices.

### Claim 16

An intersection testing module for use in a ray tracing system, configured to perform intersection testing for a ray with respect to a set of two or more primitives, each primitive being defined by an ordered set of edges, each edge being defined by a respective pair of vertices, the intersection testing module being configured to:
determine a set of distinct edges for the set of primitives, each distinct edge being part of at least one primitive of the set of primitives and being defined by a different pair of vertices to the other distinct edges in the set, wherein every edge in the ordered sets of edges that define the set of primitives is represented by a distinct edge of the set of distinct edges;
for each distinct edge in the set of distinct edges, perform an edge test to determine which side of the distinct edge the ray passes on; and
for each primitive in the set of primitives, use a result of the edge test for each distinct edge that defines that primitive to determine whether or not the ray intersects that primitive.

### Claim 17 (depends on 16)

The intersection testing module of claim 16, further comprising a memory configured to store a mapping to each distinct edge from one or more primitives, and wherein the mapping comprises an identifier for each primitive in the set of primitives, the identifier for each primitive being formed of a plurality of respective indices, wherein each index of the primitive identifier represents a corresponding edge that is part of the primitive.

### Claim 18 (depends on 17)

The intersection testing module of claim 17, wherein the memory is configured to store vertex data for each unique vertex in a set of distinct vertices, each distinct vertex being part of at least one primitive of the set of primitives and being defined by a different set of 3D coordinates from the other distinct vertices in the set of distinct vertices; and
wherein the vertex data comprises a set of coordinate indices, each coordinate index indicating a 3D coordinate of the vertex.

### Claim 19 (depends on 18)

The intersection testing module of claim 18, wherein the memory is configured to store a mapping to each distinct vertex in the set of distinct vertices against one or more edges in the set of distinct edges that are defined by that distinct vertex, the mapping comprising an identifier for each distinct edge, the identifier for each distinct edge being formed of two respective vertex indices, wherein each vertex index of the distinct edge identifier represents a corresponding vertex of the pair of vertices that defines the edge.

### Claim 20

A non-transitory computer readable storage medium having stored thereon an integrated circuit definition dataset that, when processed in an integrated circuit manufacturing system, configures the integrated circuit manufacturing system to manufacture an intersection testing module, for use in a ray tracing system, configured to perform intersection testing for a ray with respect to a set of two or more primitives, each primitive being defined by an ordered set of edges, each edge being defined by a respective pair of vertices, the intersection testing module being configured to:
determine a set of distinct edges for the set of primitives, each distinct edge being part of at least one primitive of the set of primitives and being defined by a different pair of vertices to the other distinct edges in the set, wherein every edge in the ordered sets of edges that define the set of primitives is represented by a distinct edge of the set of distinct edges;
for each distinct edge in the set of distinct edges, perform an edge test to determine which side of the distinct edge the ray passes on; and
for each primitive in the set of primitives, use a result of the edge test for each distinct edge that defines that primitive to determine whether or not the ray intersects that primitive.
