This sample demonstrates the implementation of ray queries using the Vulkan ray tracing extension VK_KHR_ray_query, introduced in Vulkan 1.2.
- GPU-based intersection testing between rays and geometry
- Efficient ray tracing for real-time rendering and physics simulations
-
Acceleration Structure Creation
- Construct bottom-level and top-level acceleration structures
- Represents scene geometry for efficient traversal
-
Ray Query Dispatch
- Specify ray origin and direction
- Support for single or batch ray queries
-
Query Processing
- GPU performs ray traversal and intersection testing
- Utilizes acceleration structure for efficiency
-
Result Retrieval
- Access intersection data (hit points, normals, distances)
- Selective intersection testing capabilities
- Performance optimization through test skipping (e.g., shadow tests)
- Enhanced flexibility compared to traditional ray tracing pipelines
- Real-time rendering
- Ray-based physics simulations
- Any scenario requiring accurate ray-geometry intersection testing
- Optimize acceleration structure updates for dynamic scenes
- Balance between query complexity and rendering performance