# US 2021/0343072 A1 · Shader binding management in ray tracing

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

- Number: US 2021/0343072 A1
- Document ID: US20210343072A1
- Status: Published application
- Kind: A1
- Application number: 17/376,866
- Filed: 2021-07-15
- Published: 2021-11-04
- Earliest claimed: 2018-04-05
- Assignees: NVIDIA Corporation
- Applicants: Nvidia Corporation
- Inventors: Martin Stich; Ignacio Llamas; Steven Parker
- Web page: https://patentgrep.com/patent/US20210343072A1

## CPC

- G06T 15/83: Phong shading
- G06F 9/54: Interprogram communication
- G06T 15/005: {General purpose rendering architectures}
- G06T 15/06: Ray-tracing
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

In various examples, shader bindings may be recorded in a shader binding table that includes shader records. Geometry of a 3D scene may be instantiated using object instances, and each may be associated with a respective set of the shader records using a location identifier of the set of shader records in memory. The set of shader records may represent shader bindings for an object instance under various predefined conditions. One or more of these predefined conditions may be implicit in the way the shader records are arranged in memory (e.g., indexed by ray type, by sub-geometry, etc.). For example, a section selector value (e.g., a section index) may be computed to locate and select a shader record based at least in part on a result of a ray tracing query (e.g., what sub-geometry was hit, what ray type was traced, etc.).

## Claims

### Claim 1

A method comprising:
evaluating, based at least on a ray-tracing query, at least one criteria that corresponds to a section of a shader binding table;
determining, based at least on the at least one criteria being satisfied, a section selector value corresponding to the section of the shader binding table;
computing a location in memory corresponding to the section using the section selector value; and
performing one or more operations to render an image using at least one shader identified by one or more shader records associated with the location.

### Claim 2 (depends on 1)

The method of claim 1, wherein the at least one criteria is based on a sub-geometry of an instance of an object associated with the ray-tracing query and the section represents the sub-geometry.

### Claim 3 (depends on 1)

The method of claim 1, wherein the at least one criteria is based on a ray type associated with the ray-tracing query and the section represents the ray type.

### Claim 4 (depends on 1)

The method of claim 1, wherein the section is a first section that is interleaved with a second section of the shader binding table.

### Claim 5 (depends on 1)

The method of claim 1, wherein the section is a first section, and the section selector value is computed based at least on a distance in memory between the first section and a second section of the shader binding table.

### Claim 6 (depends on 1)

The method of claim 1, wherein the section selector value is based at least on a total number of ray types used to index the shader binding table into sections.

### Claim 7 (depends on 1)

The method of claim 1, wherein the one or more shader records comprises an identifier of the at least one shader and a resource table defining a set of resources associated with the at least one shader.

### Claim 8 (depends on 1)

The method of claim 1, wherein the computing the location in memory corresponding to the section further uses an offset value to a location of the shader binding table in the memory.

### Claim 9 (depends on 1)

The method of claim 1, wherein the section represents a section of miss shaders.

### Claim 10

A system comprising:
one or more processors; and
one or more memory devices storing instructions that, when executed by the one or more processors, cause the one or more processors to perform a method comprising:
determining one or more values of one or more attributes of a ray associated with ray-tracing;
determining a section selector value associated with a section that corresponds to the one or more values in a shader binding table, the shader binding table comprising one or more sections indexed by the one or more attributes;
computing, from the section selector value, a location in memory corresponding to one or more shader records in the section; and
performing one or more operations to render an image using at least one shader identified by the one or more shader records.

### Claim 11 (depends on 10)

The system of claim 10, wherein the one or more sections are indexed by sub-geometry of an object instance and the one or more attributes correspond to the sub-geometry.

### Claim 12 (depends on 10)

The system of claim 10, wherein the one or more sections are indexed by ray type and the one or more attributes correspond to the ray type.

### Claim 13 (depends on 10)

The system of claim 10, wherein the section selector value is computed using an inter-section stride value that defines a distance between at least one section of a plurality of sections of the shader binding table.

### Claim 14 (depends on 10)

The system of claim 10, wherein the section selector value is computed using an intra-section stride value that defines a size of at least one section of a plurality of sections of the shader binding table.

### Claim 15 (depends on 10)

The system of claim 10, wherein the computing the location in memory corresponding to the one or more shader records further uses an offset value to a location of the shader binding table in the memory.

### Claim 16

A processor comprising:
one or more processing units to determine a section selector value to select a section of a shader binding table when a ray-tracing query satisfies at least one criteria that corresponds to the section, computes a location in memory corresponding to the section using the section selector value, and configures a shader record in the shader binding table based at least on the location in the memory.

### Claim 17 (depends on 16)

The processor of claim 16, wherein the configuring of the shader record includes storing the shader record in the memory using the location.

### Claim 18 (depends on 16)

The processor of claim 16, wherein the configuring of the shader record includes modifying the shader record in the memory using the location.

### Claim 19 (depends on 16)

The processor of claim 16, wherein the section selector value selects the section when the ray-tracing query hits a sub-geometry of an instance of an object and the section selector value is based at least on the sub-geometry.

### Claim 20 (depends on 16)

The processor of claim 16, wherein the configuring of the shader record is performed by an application and the shader binding table is stored in a Graphics Processing Unit (GPU) memory.
