Abstract:
Aspects include systems, methods, and media for implementing methods relating to increasing consistency of results during intersection testing. In an example, vertexes define edges of primitives composing a scene (e.g., triangles defining a mesh for a surface of an object in a 3-D scene). An edge can be shared between two primitives. Intersection testing algorithms can use tests involving edges to determine whether or not the ray intersects a primitive defined by those edges. In one approach, a precedence among the vertexes defining a particular edge is enforced for such intersection testing. The precedence causes an intersection tester to always test a given edge in the same orientation, regardless of which primitive defined (at least in part) by that edge is being intersection tested.
Abstract:
Aspects include systems, methods, and media for implementing methods relating to detection of invalid intersections during ray tracing. Invalid intersections can arise from imprecision in computer-based number representation, causing ray origins to be located inappropriately. In some aspects, a ray can be associated with information relating to an expected angle between the ray's direction and a normal for a to-be-identified primitive intersected by that ray. If the angle between the ray's direction and the normal of an intersected primitive is within expectations, then that information can be used in predicting whether the intersection is valid. Such expectation information can be presented as a single bit determined by a shader performing a dot product of the ray and a normal of a primitive intersected by a parent ray, or can be obtained as a by-product of ray/primitive intersection testing. Such information also can be based on whether the shader is emitting to have reflection or refraction type ray behavior.