# US 2021/0287421 A1 · Ray-tracing multi-sample anti-aliasing

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

- Number: US 2021/0287421 A1
- Document ID: US20210287421A1
- Status: Published application
- Kind: A1
- Application number: 16/819,008
- Filed: 2020-03-13
- Published: 2021-09-16
- Earliest claimed: 2020-03-13
- Assignees: Advanced Micro Devices, Inc.
- Applicants: Advanced Micro Devices, Inc.
- Inventors: Skyler Jonathon Saleh; Chen Huang
- Web page: https://patentgrep.com/patent/US20210287421A1

## CPC

- G06T 15/06: Ray-tracing
- G06T 1/20: Processor architectures; Processor configuration, e.g. pipelining
- G06T 15/005: {General purpose rendering architectures}
- G06T 17/10: Constructive solid geometry [CSG] using solid primitives, e.g. cylinders, cubes
- G06T 2210/21: Collision detection, intersection
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL

## Abstract

A technique for performing a ray tracing operation for a ray is provided. The method includes performing one or more ray-box intersection tests for the ray against one or more bounding boxes of a bounding volume hierarchy to eliminate one or more nodes of the bounding volume hierarchy from consideration, for one or more triangles of the bounding volume hierarchy that are not eliminated by the one or more ray-box intersection tests, performing one or more ray-triangle intersection tests utilizing samples displaced from a centroid position of the ray, and invoking one or more shaders of a ray tracing pipeline for the samples based on results of the ray-triangle intersection tests.

## Claims

### Claim 1

A method for performing a ray tracing operation for a ray, the method comprising:
performing one or more ray-box intersection tests for the ray against one or more bounding boxes of a bounding volume hierarchy to eliminate one or more nodes of the bounding volume hierarchy from consideration;
for one or more triangles of the bounding volume hierarchy that are not eliminated by the one or more ray-box intersection tests, performing one or more ray-triangle intersection tests utilizing samples displaced from a centroid position of the ray; and
invoking one or more shaders of a ray tracing pipeline for the samples based on results of the ray-triangle intersection tests.

### Claim 2 (depends on 1)

The method of claim 1, wherein performing the one or more ray-box intersection tests includes:
in response to determining that a first ray-box intersection test of the one or more ray-box intersection tests indicates that the ray does not intersect a scaled version of a first box associated with a non-leaf node of the bounding volume hierarchy, eliminating nodes that are descendants of the non-leaf node from consideration.

### Claim 3 (depends on 1)

The method of claim 1, wherein performing the one or more ray-box intersection tests includes:
in response to determining that a first ray-box intersection test of the one or more ray-box intersection tests indicates that the ray intersects a scaled version of a first box associated with a non-leaf node of the bounding volume hierarchy, performing one or more of a ray-box intersection test and a ray-triangle intersection test for one or more nodes that are descendants of the non-leaf node.

### Claim 4 (depends on 1)

The method of claim 1, wherein:
the bounding volume hierarchy includes one or more non-leaf nodes, each of which has an associated axis-aligned bounding box that bounds triangles that are children of the non-leaf nodes; and
the one or more scaled axis-aligned bounding boxes are scaled to prevent a false miss from occurring for samples associated with the ray.

### Claim 5 (depends on 4)

The method of claim 4, wherein the one or more scaled axis-aligned bounding boxes are scaled by increasing sizes of non-scaled axis-aligned bounding boxes by an amount that is based on a highest distance of a sample from a centroid of the ray in a projected pixel area.

### Claim 6 (depends on 1)

The method of claim 1, wherein the modified coordinate system comprises a coordinate system in which an origin of the ray is at an origin of the coordinate system and in which the ray travels in one axial direction and not two other axial directions.

### Claim 7 (depends on 1)

The method of claim 1, wherein the samples are displaced from the centroid position within a projected pixel area that is a projection of a pixel on a triangle of the one or more triangles.

### Claim 8 (depends on 1)

The method of claim 1, wherein invoking one or more shaders comprises:
in response to determining that different samples of the ray intersect different triangles of the one or more triangles, invoking different shaders for the ray.

### Claim 9 (depends on 1)

The method of claim 1, further comprising:
providing a coverage percentage to at least one of the one or more shaders based on a number of samples covered for the ray.

### Claim 10

A system for performing a ray tracing operation for a ray, the system comprising:
a shader configured to request the ray tracing operation for the ray be performed; and
a ray intersection test unit configured to:
perform one or more ray-box intersection tests for the ray against one or more bounding boxes of a bounding volume hierarchy to eliminate one or more nodes of the bounding volume hierarchy from consideration;
for one or more triangles of the bounding volume hierarchy that are not eliminated by the one or more ray-box intersection tests, perform one or more ray-triangle intersection tests utilizing samples displaced from a centroid position of the ray; and
invoke one or more shaders of a ray tracing pipeline for the samples based on results of the ray-triangle intersection tests.

### Claim 11 (depends on 10)

The system of claim 10, wherein performing the one or more ray-box intersection tests includes:
in response to determining that a first ray-box intersection test of the one or more ray-box intersection tests indicates that the ray does not intersect a scaled version of a first box associated with a non-leaf node of the bounding volume hierarchy, eliminating nodes that are descendants of the non-leaf node from consideration.

### Claim 12 (depends on 10)

The system of claim 10, wherein performing the one or more ray-box intersection tests includes:
in response to determining that a first ray-box intersection test of the one or more ray-box intersection tests indicates that the ray intersects a scaled version of a first box associated with a non-leaf node of the bounding volume hierarchy, performing one or more of a ray-box intersection test and a ray-triangle intersection test for one or more nodes that are descendants of the non-leaf node.

### Claim 13 (depends on 10)

The system of claim 10, wherein:
the bounding volume hierarchy includes one or more non-leaf nodes, each of which has an associated axis-aligned bounding box that bounds triangles that are children of the non-leaf nodes; and
the one or more scaled axis-aligned bounding boxes are scaled to prevent a false miss from occurring for samples associated with the ray.

### Claim 14 (depends on 13)

The system of claim 13, wherein the one or more scaled axis-aligned bounding boxes are scaled by increasing sizes of non-scaled axis-aligned bounding boxes by an amount that is based on a highest distance of a sample from a centroid of the ray in a projected pixel area.

### Claim 15 (depends on 10)

The system of claim 10, wherein the modified coordinate system comprises a coordinate system in which an origin of the ray is at an origin of the coordinate system and in which the ray travels in one axial direction and not two other axial directions.

### Claim 16 (depends on 10)

The system of claim 10, wherein the samples are displaced from the centroid position within a projected pixel area that is a projection of a pixel on a triangle of the one or more triangles.

### Claim 17 (depends on 10)

The system of claim 10, wherein invoking one or more shaders comprises:
in response to determining that different samples of the ray intersect different triangles of the one or more triangles, invoking different shaders for the ray.

### Claim 18 (depends on 10)

The system of claim 10, wherein the ray intersection test unit is further configured to:
provide a coverage percentage to at least one of the one or more shaders based on a number of samples covered for the ray.

### Claim 19

A non-transitory computer-readable medium storing instructions that, when executed by a processor, cause the processor to perform a ray tracing operation for a ray, by:
performing one or more ray-box intersection tests for the ray against one or more bounding boxes of a bounding volume hierarchy to eliminate one or more nodes of the bounding volume hierarchy from consideration;
for one or more triangles of the bounding volume hierarchy that are not eliminated by the one or more ray-box intersection tests, performing one or more ray-triangle intersection tests utilizing samples displaced from a centroid position of the ray; and
invoking one or more shaders of a ray tracing pipeline for the samples based on results of the ray-triangle intersection tests.

### Claim 20 (depends on 19)

The non-transitory computer-readable medium of claim 19, wherein performing the one or more ray-box intersection tests includes:
in response to determining that a first ray-box intersection test of the one or more ray-box intersection tests indicates that the ray does not intersect a scaled version of a first box associated with a non-leaf node of the bounding volume hierarchy, eliminating nodes that are descendants of the non-leaf node from consideration.
