EP-4276762-B1 - METHODS AND GRAPHICS PROCESSING UNITS FOR DETERMINING DIFFERENTIAL DATA FOR RAYS OF A RAY BUNDLE
Inventors
- PETERSON, LUKE TILMAN
- JONES, JAMES
- DWYER, Aaron
Dates
- Publication Date
- 20260506
- Application Date
- 20170314
Claims (14)
- A computer-implemented method of processing rays in a graphics processing system configured to render a scene, the method comprising: grouping a plurality of rays together into a ray bundle; performing intersection testing on the rays of the bundle; and executing a plurality of instances of a shader program, an instance corresponding to a ray of the bundle; characterised in that the shader program is operable to utilize data from a first ray of the bundle in the execution of the instance for a second ray of the bundle, wherein the execution of the instance for the second ray of the bundle comprises determining differential data for the second ray using data for the first ray, differential data indicating the rate of change of an attribute for changes in horizontal or vertical pixel or fragment position.
- The method of claim 1, further comprising: emitting a secondary ray from each of two or more instances of the shader program; and grouping the secondary rays into another ray bundle.
- The method of any preceding claim wherein results of said performing intersection testing are used to determine whether the rays are to be maintained in the ray bundle.
- The method of claim 3 wherein rays are maintained in the ray bundle if they have matching intersection testing results, wherein rays are considered to have matching intersection testing results if: the rays intersect with the same primitive; the rays intersect with the same mesh; the rays intersect with the same object; the intersections invoke the same one or more shader programs to be executed; the difference between surface normals at the intersection points is below an angular threshold; or the difference between the ray depths in the intersection points is below a depth threshold.
- The method of any preceding claim, wherein if results of said performing intersection testing on the rays of the ray bundle indicate that a ray of the ray bundle does not have matching intersection results with other rays in the ray bundle, marking the ray as a tracker ray in the ray bundle, wherein tracker rays are used to determine differential data for other rays in the bundle.
- The method of any preceding claim, further comprising splitting a ray from the ray bundle if the ray does not have matching intersection testing results with other rays in the ray bundle.
- The method of any preceding claim, further comprising receiving an indication via an API to indicate that said plurality of rays are intended to be coherent.
- The method of any preceding claim, wherein the rays to be grouped together are emitted due to the execution of a shader program, wherein a decision as to which rays to group together into a ray bundle is defined in the shader program causing the rays to be emitted.
- A graphics processing unit configured to perform the method of any of claims 1 to 8.
- The graphics processing unit of claim 9, comprising: a bundling module configured to group a plurality of rays together into a ray bundle; intersection testing logic configured to perform intersection testing on the rays of the ray bundle; and processing logic configured to execute a plurality of instances of a shader program, an instance corresponding to a ray of the ray bundle, characterised in that the shader program is operable to utilize data from a first ray of the ray bundle in the execution of the instance for a further ray of the ray bundle, wherein the execution of the instance for the second ray of the bundle comprises determining differential data for the second ray using data for the first ray, differential data indicating the rate of change of an attribute for changes in horizontal or vertical pixel or fragment position.
- The graphics processing unit of claim 10 further comprising ray memory for storing ray data for the rays of the ray bundle, wherein the ray memory is configured to store data for the rays of a ray bundle in a data structure, at least some data stored in the data structure being shared between rays of the ray bundle.
- The graphics processing unit of claim 11 wherein the ray memory is configured to store at least some of the data for one or more of the rays of the ray bundle as a difference value relative to the data for a different one of the rays of the ray bundle.
- A computer readable storage medium having encoded thereon computer readable code adapted to cause the method of any of claims 1 to 8 to be performed when the code is run on a computer.
- A computer readable storage medium having stored thereon an integrated circuit definition dataset that, when processed in an integrated circuit manufacturing system, configures the system to manufacture a graphics processing unit as claimed in any of claims 9 to 12.
Description
Background The description herein generally relates to 3-D rendering systems, system architectures, and methods. Some of the examples described herein relate to systems, architectures, and methods for asynchronous and concurrent hybridized rendering, such as hybridized ray tracing and rasterization-based rendering. Graphics Processing Units (GPUs) often provide highly parallelized rasterization-based rendering hardware. A traditional graphics processing unit (GPU) used a fixed pipeline only for rendering polygons with texture maps and gradually evolved to a more flexible pipeline that allows programmable vertex and fragment stages. Even though modern GPUs support more programmability of geometry and pixel processing, a variety of functions within a GPU are implemented in fixed function hardware. Modern GPUs can range in complexity, and may be adapted to be suited for particular uses. When designing a GPU, there is often a trade-off between various factors such as performance, size, power consumption and cost. GPUs are often used in real time rendering tasks, and optimizations for many GPU applications involve determining shortcuts to achieve a desired throughput of frames per second, while maintaining a desired level of subjective video quality. For example, in a video game, realistic modeling of light behavior is rarely an objective; rather, achieving a desired look or rendering effect is often a principal objective. Traditionally, ray tracing is a technique used for high quality, non-real time graphics rendering tasks, such as production of animated movies, or producing 2-D images that more faithfully model behavior of light in different materials. In ray tracing, control of rendering and pipeline flexibility to achieve a desired result were often more critical issues than maintaining a desired frame rate. Also, some of the kinds of processing tasks needed for ray tracing are not necessarily implementable on hardware that is well-suited for rasterization. As an example, ray tracing is particularly suited for introducing lighting effects into rendered images. Sources of light may be defined for a scene which cast light onto objects in the scene. Some objects may occlude other objects from light sources resulting in shadows in the scene. Rendering using a ray tracing technique allows the effects of light sources to be rendered accurately since ray tracing is adapted to model the behaviour of light in the scene. Some operations performed in graphics processing systems involve determining differential data. Differential data indicates the rate of change of an attribute for changes in the horizontal or vertical pixel position (dx or dy). For example, the distance from a render plane of an object in the scene affects the magnitude of a shift in scene space that corresponds to a shift in space. As a further example, if a surface is inclined with respect to the viewpoint from which a scene is being rendered then a one-pixel shift vertically in screen-space may correspond to a different shift in scene-space than a one-pixel shift horizontally in scene-space. The gradient data (i.e. differential data) can be useful for various functions, e.g. selecting an appropriate mip map level of a texture to be applied to a surface in the scene. Patent application US 2010/0073369 A1 by McCombe et al. discloses a rendering system, wherein bundles of rays are submitted to intersection testing, and based on the intersection results, rays from the bundle are shaded in a ray shader. The document "Tracing Ray Differentials" by Homan Igehy, proceedings SIGGRAPH 99, page 179-186, discloses an algorithm for tracking an approximation to a ray's footprint based on ray differentials and demonstrated the use of ray differentials to perform texture antialiasing without super-sampling the image frame. Summary There is provided a computer-implemented method of processing rays in a graphics processing system for rendering a scene, as defined in claim 1. There is provided a graphics processing unit configured to render a scene, as defined in claim 9. There is also provided a non-transitory computer readable storage medium as defined in claims 13 and 14, respectively. Brief Description of the Drawings Examples will now be described in detail with reference to the accompanying drawings in which: Figure 1 shows a graphics processing system;Figure 2 is a flow chart for a method of graphics processing;Figure 3 illustrates a scene to be rendered from a viewpoint;Figure 4 illustrates an example of a bundle of rays which do not split;Figure 5 illustrates an example of a bundle of rays which do split;Figure 6 shows a computer system in which a graphics processing system is implemented; andFigure 7 shows an integrated circuit manufacturing system for generating an integrated circuit embodying a graphics processing system. The accompanying drawings illustrate various examples. The skilled person will appreciate that the illustrated element boundaries (e.g