Expand description
Ray tracing pipeline functionality for GPU-accelerated ray tracing.
§Overview
Ray tracing pipelines enable high-performance ray tracing by defining a set of shader stages that handle ray generation, intersection testing, and shading calculations. The pipeline consists of different shader stages organized into shader groups.
§Shader types
§Ray generation shader
- Entry point for ray tracing.
- Generates and traces primary rays.
- Controls the overall ray tracing process.
§Intersection shaders
- Built-in triangle intersection handles standard triangle geometry intersection.
- Custom intersection implements custom geometry intersection testing.
§Hit shaders
- Closest hit executes when a ray finds its closest intersection.
- Any hit is an optional shader that runs on every potential intersection.
§Miss shader
- Executes when a ray doesn’t intersect any geometry.
- Typically handles environment mapping or background colors.
§Callable shader
- Utility shader that can be called from other shader stages.
- Enables code reuse across different shader stages.
§Pipeline organization
Shaders are organized into groups:
- General groups contain ray generation, miss, or callable shaders.
- Triangle hit groups contain closest-hit and optional any-hit shaders.
- Procedural hit groups contain intersection, closest-hit, and optional any-hit shaders.
The ray tracing pipeline uses a Shader Binding Table (SBT) to organize and access these shader groups during execution.
Structs§
- RayTracing
Pipeline - Defines how the implementation should perform ray tracing operations.
- RayTracing
Pipeline Create Info - Parameters to create a new
RayTracingPipeline
. - Shader
Binding Table - An object that holds the shader binding table buffer and its addresses.
- Shader
Binding Table Addresses - An object that holds the strided addresses of the shader groups in a shader binding table.
- Shader
Group Handles Data - Holds the data returned by
RayTracingPipeline::group_handles
.
Enums§
- RayTracing
Shader Group Create Info - Enum representing different types of Ray Tracing Shader Groups.