EP-4742169-A2 - RAY TRACING
Abstract
There is provided a computer implemented method for quantising a ray representative to obtain a quantised ray representative, wherein the ray representative represents compressed ray data for a ray, the ray defined by three direction components and three position components, wherein the direction component having the greatest magnitude defines a major axis of the ray, wherein the ray representative comprises: (i) two translated position components defining a translated position along axes which are not the major axis of the ray and (ii) two rescaled direction components along axes which are not the major axis of the ray, the method comprising: decreasing a number of computational bits representing each of the two translated position components and the two rescaled direction components in the ray representative to thereby obtain the quantised ray representative, wherein the quantised ray representative comprises data that indicates the major axis of the ray, the two position components defining the translated position and the two rescaled direction components in fewer computational bits than data representing the ray representative.
Inventors
- SMITH-LACEY, Peter
- FENNEY, SIMON
Assignees
- Imagination Technologies Limited
Dates
- Publication Date
- 20260513
- Application Date
- 20230926
Claims (15)
- A computer implemented method for quantising a ray representative to obtain a quantised ray representative, wherein the ray representative represents compressed ray data for a ray, the ray defined by three direction components and three position components, wherein the direction component having the greatest magnitude defines a major axis of the ray, wherein the ray representative comprises: (i) two translated position components defining a translated position along axes which are not the major axis of the ray and (ii) two rescaled direction components along axes which are not the major axis of the ray, the method comprising: decreasing a number of computational bits representing each of the two translated position components and the two rescaled direction components in the ray representative to thereby obtain the quantised ray representative, wherein the quantised ray representative comprises data that indicates the major axis of the ray, the two position components defining the translated position and the two rescaled direction components in fewer computational bits than data representing the ray representative.
- The method of claim 1, wherein the quantised ray representative is formed from a predetermined number of computational bits.
- The method of claim 1 or 2, further comprising, prior to quantising the ray representative, converting the ray data for the ray into the ray representative, the converting comprising: identifying which of the three direction components of the ray data has the greatest magnitude, and defining the axis of the identified direction component as the major axis of the ray; determining a translated position on the ray at which the position component along the major axis is zero; and rescaling the three direction components of the ray so that the magnitude of the direction component along the major axis is one.
- The method of any preceding claim, further comprising converting at least the two rescaled direction components into a fixed-point representation prior to decreasing the number of computational bits.
- The method of claim 4, wherein decreasing the number of computational bits comprises: clamping the fixed-point representations of the rescaled direction components to thereby obtain representations having equal exponent bits; and extracting a pre-determined number of most-significant mantissa bits from the clamped fixed-point representations to form two rescaled direction components of the quantised ray representative.
- The method of claim 4, further comprising: prior to decreasing the number of computational bits: rescaling the values of the two translated position components by a multiple of a scene extents size; converting the two rescaled translated position components into a fixed-point representation; decreasing the number of computational bits by: clamping the fixed-point representations of the rescaled translated position components to thereby obtain representations having equal exponent bits; and extracting a pre-determined number of most-significant mantissa bits from the clamped fixed-point representations of the rescaled translated position components to form the two position components of the quantised ray representative.
- The method of any of claims 1 to 3, further comprising reducing one or more of i) the number of mantissa bits and ii) the number of exponent bits of each of the two translated position components and the two rescaled direction components of the ray representative and, wherein the two position components and the two rescaled direction components of the quantised ray representative are represented in floating-point format.
- The method of any preceding claim, wherein the ray representative further comprises an indication of the major axis and, wherein the indication of the major axis comprises two bits, and wherein the value of the direction component of the ray representative along the major axis is plus one.
- The method of any preceding claim, wherein the data in the quantised ray representative comprises no more than three bits to indicate each of said two rescaled direction components, and/or comprises no more than five bits to indicate each of said two position components.
- The method of any preceding claim, wherein the quantised ray representative identifies a set of rays, each ray of the set of rays comprising similar position and direction components.
- The method of any preceding claim, further comprising generating a hash of the quantised ray representative to represent the ray representative, wherein the hash of the quantised ray representative is stored in fewer computational bits than the quantised ray representative and, wherein generating the hash comprises performing logical XOR operations on the bits of the quantised ray representative to reduce the number of bits of the quantised ray representative.
- The method of any preceding claim, wherein the quantised ray representative is used to store an indication of the ray, or an indication of a set of rays comprising similar position and direction components, in a cache, the cache being used to store data for intersection testing that is used by the ray tracing system to render an image of a scene.
- A computer system for quantising a ray representative to obtain a quantised ray representative, wherein the ray representative represents compressed ray data for a ray, the ray defined by three direction components and three position components, wherein the direction component having the greatest magnitude defines a major axis of the ray, wherein the ray representative comprises: (i) two translated position components defining a translated position along axes which are not the major axis of the ray and (ii) two rescaled direction components along axes which are not the major axis of the ray, the computer system comprising processing logic configured to: decrease a number of computational bits representing each of the two translated position components and the two rescaled direction components in the ray representative to thereby obtain the quantised ray representative, wherein the quantised ray representative comprises data that indicates the major axis of the ray, the two position components defining the translated position and the two rescaled direction components in fewer computational bits than data representing the ray representative.
- Computer readable code configured to cause the method of any of claims 1 to 12 to be performed when the code is run.
- A 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 a computer system as claimed in claim 13.
Description
CROSS-REFERENCE TO RELATED APPLICATIONS This application claims priority from UK patent applications GB 2214122.0 and GB 2214124.6, filed on 27 September 2022, which are herein incorporated by reference in their entirety. BACKGROUND Ray tracing is a computational rendering technique for generating an image of a scene by tracing paths of light usually from the viewpoint of a camera through the scene. The paths of light that are traced through the scene are referred to as rays. Each ray to be traced is modelled as originating from a viewpoint of the scene and passes through a pixel into the scene. As a ray traverses the scene it may intersect objects within the scene. The interaction between a ray and an object it intersects can be modelled to create realistic visual effects. For example, in response to determining an intersection of a ray with an object, a shader program may be executed in respect of the intersection. The shader program is a portion of computer code. A programmer can write the shader program to define how the system reacts to the intersection which may, for example cause one or more secondary rays to be emitted into the scene. Alternatively, the shader program could cause one or more rays to be emitted into the scene for the purposes of determining whether the object is in shadow at the intersection point. Rendering an image of a scene using ray tracing may involve a large number of intersection tests. In real-life ray tracing systems, billions of intersection tests may be performed to render a single image of a scene. In order to reduce the number of intersection tests that need to be performed, ray tracing systems can generate acceleration structures. An acceleration structure comprises a number of nodes, with each node representing a region (e.g., volume) within the scene. Acceleration structures are often hierarchical, forming a tree-like structure, such that they include multiple levels of nodes. The nodes near the top of the acceleration structure represent relatively large regions in the scene. For example, the root node of the acceleration structure may represent the whole scene. Nodes near the bottom of the acceleration structure represent relatively small regions in the scene. Leaf nodes of the acceleration structure represent regions that at least partially bound one or more primitives (e.g., triangles) in the scene, and comprise pointers to their bounded primitives. Intersection testing is traditionally performed for a ray using the acceleration structure by first testing the ray for intersection with the root node of the acceleration structure. If the ray is found to intersect a parent node, such as the root node, testing can then proceed to the child nodes of that parent. In contrast, if the ray is found not to intersect a parent node, intersection testing of the child nodes of that parent node can be avoided, minimising computational intensity. If a ray is found to intersect a leaf node, then it can be tested against the objects within the region represented by the leaf node to thereby determine which object(s) the ray intersects with. The objects may be represented using primitives. A primitive denotes a unit of geometry in the system. Ray tracing operations are typically highly computationally intensive. The intensive nature of these operations means that there is a desire to increase the speed of, or decrease latency associated with, these operations. Further improvements that can be made to ray tracing technologies include a decrease in the hardware area required to perform the processing operations. SUMMARY This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter. There is provided a computer implemented method for quantising a ray representative to obtain a quantised ray representative, wherein the ray representative represents compressed ray data for a ray, the ray defined by three direction components and three position components, wherein the direction component having the greatest magnitude defines a major axis of the ray, wherein the ray representative comprises: (i) two translated position components defining a translated position along axes which are not the major axis of the ray and (ii) two rescaled direction components along axes which are not the major axis of the ray, the method comprising: decreasing a number of computational bits representing each of the two translated position components and the two rescaled direction components in the ray representative to thereby obtain the quantised ray representative,wherein the quantised ray representative comprises data that indicates the major axis of the ray, the two position components defining the translated position and the two rescaled direct