In this article
A bounding box narrows the search; the application must still evaluate the intended procedural surface before generating an intersection.
Separate acceleration bounds from geometry
A procedural sphere, curve or custom surface can be represented in an acceleration structure through a bounding box. That box is a search aid rather than the actual surface. If a shader treats every box candidate as a hit on the represented object, it creates false geometry in empty corners of the bounds. Define the procedural primitive and its intersection operation before using the acceleration structure to make those tests cheaper.
Supply valid bounding-box input
The Vulkan AABB input reference describes the data address and stride used to build procedural bounds. Preserve the mapping from each bound to the application’s primitive parameters. A valid array layout does not prove that a bound encloses the entire intended surface. Too-small bounds can miss valid intersections before the shader ever gets a candidate, while unnecessarily loose bounds can increase procedural testing work.
Generate a surface intersection explicitly
The SPIR-V ray-query specification distinguishes generating an intersection for an AABB candidate from confirming a triangle candidate. The generated hit requires a parametric position along the ray. Compute the actual procedural intersection and supply a valid value under the query contract. Do not substitute the box-entry distance for a sphere or another curved surface unless the box itself is deliberately the geometry being rendered.
Keep custom logic in the calling shader
The ray-query extension states that queries return traversal information to the caller and do not invoke additional shaders. Therefore a procedural ray query does not automatically run the intersection shader of a separate ray-tracing pipeline. Keep primitive lookup and narrow-phase testing in the intended calling-shader path. Distinguish world and object coordinates, and preserve the meaning of the ray parameter when applying transforms or changing direction normalization.
Test a ray through empty bound space
Use an analytic object whose bounding box contains a visibly empty region. Trace a ray through that region and another through the true surface, then compare generated hits with an independent geometric calculation. The guides to GPU BVH traversal and renderer compatibility provide related context. Correctness requires conservative bounds, a valid primitive mapping and the intended narrow-phase test; a successful acceleration build alone cannot establish a correct procedural object.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.