TraceRay
Description
Traces a ray through the acceleration structure.
Signature
void TraceRay<payload_t>( RaytracingAccelerationStructure AccelerationStructure, uint RayFlags, uint InstanceInclusionMask, uint RayContributionToHitGroupIndex, uint MultiplierForGeometryContributionToHitGroupIndex, uint MissShaderIndex, RayDesc Ray, inout payload_t Payload);
Generic Parameters
payload_t
Parameters
AccelerationStructure : RaytracingAccelerationStructure
The acceleration structure to traverse
RayFlags : uint
Flags controlling ray behavior
InstanceInclusionMask : uint
Mask for filtering instance visibility
RayContributionToHitGroupIndex : uint
Offset for hit group indexing
MultiplierForGeometryContributionToHitGroupIndex : uint
Multiplier for geometry-based hit group indexing
MissShaderIndex : uint
Index of the miss shader to execute if no hit is found
Ray : RayDesc
Description of the ray to trace
Payload : payload_t
Structure for passing data between shaders
Remarks
Core ray tracing function for initiating traversal
Availability and Requirements
Defined for the following targets:
hlsl
Available in stages: raygen
, closesthit
, miss
.
glsl
Available in stages: raygen
, closesthit
, miss
.
cuda
Available in stages: raygen
, closesthit
, miss
.
spirv
Available in stages: raygen
, closesthit
, miss
.
Requires capability: spvRayTracingKHR
.