| CPC G06T 15/06 (2013.01) [G06T 15/005 (2013.01); G06T 2210/12 (2013.01); G06T 2210/21 (2013.01)] | 20 Claims |

|
1. A method of determining, in a ray tracing system, whether a ray intersects a three-dimensional axis-aligned volume, wherein the volume is defined by a front-facing plane and a back-facing plane for each of the dimensions, u, ν and w, of the three-dimensional axis-aligned volume, wherein bmin,u is a constant u component value of the front-facing plane for the u dimension, bmax,u is a constant u component value of the back-facing plane for the u dimension, bmin,ν is a constant ν component value of the front-facing plane for the ν dimension, bmax,ν is a constant ν component value of the back-facing plane for the ν dimension, bmin,w is a constant w component value of the front-facing plane for the w dimension, and bmax,w is a constant w component value of the back-facing plane for the w dimension, the method comprising:
selectively reversing axes for components of the ray and the axis-aligned volume to provide that Du≥0, Dν≥0 and Dw>0, wherein Du, Dν and Dw are components of a ray direction vector, D, for the ray, wherein Dw is the major component of the ray direction vector;
determining scaled ray components ρu and ρν, wherein
![]() determining a scaled minimum culling distance, tmin,scaled, using a result of multiplying an unscaled minimum culling distance for the ray, tmin,unscaled, by the magnitude of Dw;
determining a scaled maximum culling distance, tmax,scaled, using a result of multiplying an unscaled maximum culling distance for the ray, tmax,unscaled, by the magnitude of Dw;
determining cross-multiplication values of Aρubmin,ν, Aρubmin,u, Aρubmax,u and Aρνbmax,u, wherein A is a scalar value;
determining a cross-multiplication value of one or both of: (i) Aρubmin,w and (ii) Aρνbmin,w;
determining a cross-multiplication value of one or both of: (i) Aρubmax,w and (ii) Aρνbmax,w;
using the determined cross-multiplication values to:
identify which of the front-facing planes intersects the ray furthest along the ray; and
identify which of the back-facing planes intersects the ray least far along the ray;
determining whether the ray intersects the identified front-facing plane of the volume at a position that is no further along the ray than the position at which the ray intersects the identified back-facing plane;
determining whether ρ−tmax,scaled is no less than b−, wherein ρ−=ρu and b−=bmin,u if the front-facing plane for the u dimension is the identified front-facing plane, wherein ρ−=ρν and b−=bmin,ν if the front-facing plane for the ν dimension is the identified front-facing plane, and wherein ρ−=1 and b−=bmin,w if the front-facing plane for the w dimension is the identified front-facing plane;
determining whether ρ+tmin,scaled is no greater than b+, wherein ρ+=ρu and b+=bmax,u if the back-facing plane for the u dimension is the identified back-facing plane, wherein ρ+=ρν and b+=bmax,ν if the back-facing plane for the ν dimension is the identified back-facing plane, and wherein ρ+=1 and b+=bmax,w if the back-facing plane for the w dimension is the identified back-facing plane; and
determining that the ray intersects the volume if all three of: (i) it is determined that the ray intersects the identified front-facing plane of the volume at a position that is no further along the ray than the position at which the ray intersects the identified back-facing plane, (ii) it is determined that ρ−tmax,scaled is no less than b−, and (iii) it is determined that ρ+tmin,scaled is no greater than b+, otherwise determining that the ray misses the volume.
|