Expand description
The ray tracing pipeline’s operations. WGSL has no ray tracing pipeline and naga’s has no ReportHit,
IgnoreHit, CallShader or hit-group indices, so a ray tracing program (see crate::stage_functions) does
what the pipeline does for it by calling functions of its own module that have no body: the call is the
operation, the arguments its operands, and a consumer that traces rays reads the calls. A stub’s body is empty (a
function that returns a value returns false), so nothing that runs the module as written runs the pipeline.
| name | arguments | result |
|---|---|---|
TRACE_RAY | acceleration structure, ray flags, instance mask, hit group offset, hit group stride, miss index, origin (vec3<f32>), t min, direction (vec3<f32>), t max, pointer to the payload | |
REPORT_HIT | t (f32), hit kind (u32), pointer to the attributes | whether the hit was accepted (bool) |
CALL_SHADER | shader index (u32), pointer to the parameter | |
IGNORE_HIT | (the program ends) | |
ACCEPT_HIT_AND_END_SEARCH | (the program ends) |
Constants§
- ACCEPT_
HIT_ AND_ END_ SEARCH AcceptHitAndEndSearch: an any-hit program accepts the hit, stops the search and ends.- CALL_
SHADER CallShader: run a callable program.- IGNORE_
HIT IgnoreHit: an any-hit program rejects the candidate hit and ends.- OPERATIONS
- Every operation, by name.
- REPORT_
HIT ReportHit: an intersection program reports a hit att.- TRACE_
RAY TraceRay: shoot a ray into an acceleration structure; the payload is read and written by the programs it runs.