OptionallayoutLayout of @group(3); omit when the snippet has no bindings.
ReadonlymappingOptionalrequiresThe snippet calls the provider's traceHitShade (capabilities.hitShade); the pass refuses a provider without it.
OptionalsampledSampled textures in layout (probes: one atlas per size), likewise (D4900). Default 0.
OptionalstorageStorage buffers in layout, counted against the device's per-stage limit. Default 0.
OptionalstorageStorage textures in layout, likewise. Default 0.
view: an equirect 2-D texture (any float format) or a cube. Recreate when the texture changes.
Environment intensity and lights for groups made by createBindGroup (one shared uniform).
Optionallights: HitLights
How the pass shades a traced hit: WGSL defining
fn shadeTracedHit(hit: Hit, P: vec3f, N: vec3f, dir: vec3f) -> vec3f
(world hit point, world normal facing the ray (the shading normal if the provider has one, D1700), unit ray direction; returns the radiance leaving P toward the ray origin). It may call
traceHitMaterial(hit),traceHitSpecular(hit),hitLayered, the pass'ssampleRadianceFallback(P, dir, roughness)and the pass's shadow queryfn traceLightVisible(P: vec3f, N: vec3f, L: vec3f, tMax: f32) -> bool
(false if the provider's
traceAnyfinds geometry between P, offset along N like the reflection ray's origin, and P + L x tMax; always true with the pass'shitShadowsoff; D903). Its own bindings, if any, go in@group(3). The on-screen reuse (a hit visible in the current frame takes its scene colour) happens in the pass before this is called.