HitObject.TraceRay
Description
Executes ray traversal (including anyhit and intersection shaders) like TraceRay, but returns the resulting hit information as a HitObject and does not trigger closesthit or miss shaders.
Signature
static HitObject HitObject.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
RayFlags : uint
InstanceInclusionMask : uint
RayContributionToHitGroupIndex : uint
MultiplierForGeometryContributionToHitGroupIndex : uint
MissShaderIndex : uint
Ray : RayDesc
Payload : payload_t
Availability and Requirements
Defined for the following targets:
hlsl
Available in stages: raygen
, closesthit
, miss
.
Requires capability: hlsl_nvapi
.
glsl
Available in stages: raygen
, closesthit
, miss
.
spirv
Available in stages: raygen
, closesthit
, miss
.
Requires capabilities: spvRayTracingKHR
, spvShaderInvocationReorderNV
.