pub struct TraceRay<'a> {
pub scene: ResourceId,
pub flags: u32,
pub mask: u32,
pub hit_group_offset: u32,
pub hit_group_stride: u32,
pub miss_index: u32,
pub origin: [f32; 3],
pub t_min: f32,
pub direction: [f32; 3],
pub t_max: f32,
pub payload: &'a mut [u32],
}Expand description
TraceRay: a ray shot into an acceleration structure. The payload is the words of the program’s payload structure,
which the programs the ray runs read and write; the caller leaves it as the ray’s last program did.
Fields§
§scene: ResourceIdThe interface resource of the acceleration structure.
flags: u32The ray’s flags (crate::ray_flags).
mask: u32The instance inclusion mask: an instance is seen when it shares a bit with it.
hit_group_offset: u32RayContributionToHitGroupIndex: added to the hit group index.
hit_group_stride: u32MultiplierForGeometryContributionToHitGroupIndex: the geometry index is multiplied by it.
miss_index: u32MissShaderIndex: which miss program runs if nothing is hit.
origin: [f32; 3]The ray’s origin in world space.
t_min: f32The nearest distance along the ray that counts as a hit.
direction: [f32; 3]The ray’s direction in world space.
t_max: f32The farthest distance along the ray that counts as a hit.
payload: &'a mut [u32]The words of the payload structure.